The Basics
To build an understanding of how WordPress themes work, start at the WordPress Theme Handbook, Chapter Two.
This will give you a understanding of
- Template Files
- Post Types
- The Template Hierarchy
- The Loop
- Template Tags
- Theme Functions
- Including CSS & JavaScript
- Conditional Tags
- Categories & Tags
Template Hierarchy Links
The template hierarchy is one of the fundamental things to understand if you want to code templates effectively. Here are three good diagrams. The first is a simplified version of a typical WordPress web page.
The second is a graphic of the template hierarchy. The third has essentially the same content as the second, but each box is a link to additional information.