php Is a scripting programming language. Here's a simple example:
Header("Cache-Control: no-cache, must-revalidate");
That is, the program in php doing something, and then outputs the information. The web server sends it all in the form page to the user's browser.
But voobshe, it is felt that you need to read what web server, how it works, what is cgi scripts, php, python, html, http Protocol.