A typical request goes as follows:
- Apache receives a request for a URL and forwards this request on to PHP.
- PHP sends 'queries', in a language called SQL, to the database, which responds by generating the required information.
- PHP formats the information into a web page constructed from HTML that is then passed back to Apache.
- Apache sends the web page to the browser which displays it to the user.
Apache - A web server, in the simplest sense it finds the correct page to display. If you type in some URL in web browser (Chrome, Explorer etc) it will find that page which would contain PHP to make this page, and apache would interpret it and then pass it off to your browser (such as Chrome or Firefox) converted into HTML and sometimes Javascript.
PHP - The programmer tells the page what it should display using the PHP language. PHP will ask for things from the database, which in your question would be MySQL
MySQL - In order to save user inputs, a database is needed. The programmer tells the PHP to look up certain things, such as in the simplest sense "Find everything that was entered for the post with ID #2339"