Create a file with PHP code, lets call it test.php. Store it to the folder c:/xampp/htdocs (results in c:/xampp/htdocs/test.php). Start Apache from the Xampp Controlbox. Open any browser and enter
http://localhost/test.php in order to run your file.
If you like to put your files in a separate folder, lets say "myproject", create a folder c:/xampp/htdocs/myproject, put your test.php into that folder and enter
http://localhost/myproject/test.php in your browser.
You definately should go for some books and/or tutorials about Web Programming, including Apache, PHP, MySQL etc., that is a sophisticated development environment and a forum cannot replace the urgent need of reading lots of documentation. There is also a FAQ for Xampp
https://www.apachefriends.org/faq_windows.html which you should read at first.