A WordPress theme is responsible for everything the visitor sees: which template file is picked for a given URL, how posts are rendered inside the loop, where menus and images appear, and which features the theme declares support for.
The official starting point is the open_in_new Theme Handbook .
In this section you’ll find the practical parts of building a theme from scratch: the minimal file set a theme needs, how the template hierarchy resolves a request, how to output posts and categories, and how to register navigation menus.
Andrew Dorokhov