Why?
Because, to code for Wordpress, you need a server.
Why?
Because PHP is a server-side programming language. That means that it's not possible to try running a PHP script on your own PC without any additional programs.
And that's a problem, because...?
You either have to use a free online hosting service (there are many out there) or buy one (again, there are many out there). However, experience shows that it's much easier to just test files locally - because there's no connection or testing problems, and everything goes much easier.
How to "fix" that?
XAMPP is a great solution (for Windows, there is also MAMPP for Mac and Linux). I recommend choosing the "Basic" package since you won't need more for installing Wordpress.
After downloading the program (EXE), run the file and install XAMPP. They recommend installing directly in the C:\ path, but I haven't seen any differences with another (C:\Program Files\...) choice (however, that doesn't mean that the same will be OK for you!). Wait until the application installs, and then run it by double-clicking on "xampp-control" in your installation folder.
You should now click on the "start" button next to "Apache" and "MySQL". If the PC asks you something about safety of XAMPP and blocking the application, choose "unblock" or something similar. The application itself should now look like this (image from an 4-year old interview):

Go to http://localhost and, if everything is correct, your screen should have a nice, big logo of XAMP in the center of your browser (if not, something went wrong - check again if you did everything correct).
Now, the way I installed Wordpress on XAMPP follows:
Firstly, navigate to http://localhost/phpmyadmin/ and create a database under the "My SQL localhost" screen (you should notice a "Create new database" label). Under the label, choose a name for your database and click on "Create".
Go back home by clicking on the house button in the upper left part of the screen. Next, click on the "Privileges" tab and choose "Add new user".
Choose "use text field" from the drop-down menu for your name and password, but "local" for Host (and enter a name of "localhost" in the appropriate text box). Check all privileges, since not much people (if anyone) will be visiting and/or trying to hack your site (even if they do, there's not much they could do with it - no purpose...). Click on "Go" to create the new user.
In the "Add privileges on the following database" choose your Wordpress database's name.
Now, download the latest version of Wordpress and navigate to your xampp\htdocs folder. Extract the Wordpress folder there, and then configure your wp-config-sample.php file by opening it in any text editor.
After doing that, you can delete the old "wp-config-sample.php" file and go to http://localhost/wor...min/install.php. Click on install.
That's it! (Were you expecting more steps?
(Sorry for lack of images here, I simply didn't have the time... If you don't understand something, just make a post and I'll try to explain)















