WordPress uses template files, template tags, and CSS stylesheets to generate sites. Template files contain the building blocks like headers and footers. Template tags provide instructions and request information from the database. CSS stylesheets style the templates using classes. Common classes include those for image alignment, captions, menus, widgets, and more. PHP is used to query and display content through the loop and template tags.