Apache is a web server application, ie it can host webpages .
When a user enters an Url in Browser , the browser send a request to the apache server with that file name.
Apache identifies the requested Page or file in the File System of Server. (where the file resides)
If its a PHP page it use PHP engine interpret the php file and generates an output (Sometime The PHP file will read some entries from the database server or will send a mail using the mail server)
The output is HTML form and Apache send it back to Web Browser
The webbrowser will show the HTML Code is browser in a Formatted way (Check the View Source Code option in Browser to see the HTML Code)