Below is an easy to understand infographic of the working of a WordPress site. If you are new to WordPress or if you want to edit your theme files to add plugin code then this infographic will definitely come handy to understand the structure of a WordPress Theme. Credit: Yoast.com