Don't be so hard on yourself (or us). We all make mistakes, especially when first learning. Obviously it is possble to install PHP on your machine and debug from there - how do you think your webserver does it? Any machine can be a webserver - you just need the right software.
Use of the links we've provided, or get on to Google and do a search. You want to install Apache & PHP, and perhaps MySQL. Installing them by yourself will, like I said earlier, give you a better understanding of everything. And yes, once you install and configure everything, it's as easy as saving it to your C:\ drive and typing in "http://localhost/" in your browser.
Good luck, and as always, post here for help. But since I have a feeling you're going to try installing, be sure to post in the appropriate forum (<cough>install forum</cough 😃)