Either way I'm going to talk about PHP and MYSQL now.
These are your bread and butter for serverside web development. PHP is another interreted language like JS but it's really only used for serverside applications. Up until around 10 years ago when NodeJS came out it was the default language for writing webserver and huge parts of the internet are built with it - all the wordpress sites, wikipedia, lolcow farm etc. It can be kind of a messy language but it's still an important one to learn because the use is still so widespread. And because so many non-coders occasionally have to learn a small amount of PHP to eg make their wordpress sites work properly there are a vast number of tutorials explaining how to do things.
In order to practice, you need an environment, also called a stack. On the server this is typically a LAMP stack - Linux, Apache, MySQL, PHP but if you're on windows you want to put WAMP into google instead. Here are a few:
- does exactly what you'd expect
- minimal installation headaches (uses SQLite instead of a full blown MySQL installation, but everything pretty much works the same way)
- works on mac as well as windows
I wouldn't recommend trying to install the webserver, interpreter and database one by one, it's a headache and there's really no need and you aren't gaining transferable skills because linux distros ship this by default and 99% of any servers you work on will be running linux.
Once you have your stack things get really easy, you just type localhost into your browser and can start serving yourself webpages and seeing how things work without getting tangled in how to access a remote server.
If you're just running PHP/MySQL based applications, servers are free. Yes, free. You're limited with what you can get the machine to do (e.g. anything other than processing PHP scripts that serve webpages) and the hosts will serve ads that you didn't put there, but for experimenting it's great.
offers free PHP/MySQL hosting, but google can find you others.