PHP stands for PHP hypertext preprocessor and is a scripting languge that is used to create dynamic websites. It can itself using server and database MySQL.
WAMP and XAMP are used to run PHP files.
First, you have to download WAMP or XAMP software from the Internet then install it than writing the PHP file that is source code and storing it inside "www". XAMP provides a folder which is known as "https". This is the folder in which the Wamp is stored. Then open your web page that is PHP file using a web browser. this is running PHP locally.
To run the file you need to typehttp://localhost/filename.php/
WAMP server is a server software which helps in running dynamic web pages.
XAMP server is a free open source server package.
For Linux, you need to use LAMP software.
Running php file is very easy and simple you just need to download the software and you can run it.