I have background in programming (I am an electrical engineer and have become familiar with numerous languages over the years); however, I only starting working with wordpress and backend web development in the past few weeks.
I taught myself php/html/css over the past two weekends... built a plug in, made custom page types, etc. Now working on building a theme. But even as I get deeper into how WP and all the other applications come in to play, there is one aspect I can't seem to understand even with all the research I have done.
How exactly does WP work, fundamentally, in conjunction with a web server?
I know WP is a CMS application that essentially is acting as an admin GUI to aid in building websites/storing data without a lot of coding knowledge. I know WP stores/pulls info from a database through MySQL, provides 'core' functions for developers to access that data, etc. I understand the loop and how the static (HTML/CSS) and dynamic(JS) portions of the site are built uses php and the file structure + content. I get the web server processes a page request and pulls the static/dynamic content for the site.
But how is a web server communicating with WP? Does apache only talk to WP or does it communicate with the database/file structure directly? It seems that the database/meta data is stored by WP so at some point apache must have to pull from WP... And to add to my confusion, I host my files with dream host which is also a web server but seems to have some components of apache?
What I am not understanding? Any insight would be greatly appreciated!