What hook does new blog template watch for during registration and selection of template?

How does New blog templates know what template to use upon site creation? Is the input of the Choice during registration of the blog a specific meta field?

any 100 ft few bullet overview you care to share on the core functions?