I am looking to teach myself some web programming, but I am not sure how I can experiment with an actual website. Are there sites that host platforms for these purposes?
Depending on what your goals are, you may not need to purchase a domain name and hosting.
If you have a Windows, Macintosh, or Linux computer in your possession with some spare disk space and CPU capacity, you can do it all on your own system. I've used Apache and Apache Tomcat on Windows and Mac systems, and if you have a new enough Windows system, you may be able to run IIS as well. This has the benefit of keeping your work private, which is always useful for works in progress.
The best host or plattform to experiment with is your own computer. Here you (potentially) have root rights for everything and you can learn how to configure your webserver, install all necessary libraries for languasge support etc.
I would recommend to use XAMPP bundle -- this is a bundle that already has a webserver (Apache), a database (MySQL), and two popular web languages PHP and Perl. XAMPP is the name of the original linux installation, but feel free to take WAMPP for Windows or MAMPP for Mac OS -- they all are most updated version of the same distribution.
But back to your question: as long as you have the bundle installed you can directly open your webpage by typing
127.0.0.1 in your address line -- these are the typical aliases of your own computer. You can immediately start with web development and the deployment of your project will be very easy, since it is on the same machine.
If you want that your webpage is available from outside then you can easily associate a certain DNS name (this is something like http://yousitename.host.com) with your home PC using Dynamic DNS service: this is mostly free (see here for detailed list of providers and prices) and you don't need to buy or rent any server somewhere.
Should you nonetheless wish to have an independent (from your home computer) webpage, I would suggest to look at the free webhosting offer fist. There are plenty of sites where you can host your page for free. Just google for "free web hosting". Be, however, prepared, that the free service has a very limited space, in most cases is linux-based (no licence costs) and often adds some ad to your webpage (either in form of a pop-up window or requires you to do it).
Just buy a domain to test with (as low as 99 cents for the first year if you buy a .info, otherwise about $8-12 a year) and get inexpensive shared hosting with the features you need (LAMP or Windows). This usually runs between $5-15 a month although if you need something like Sharepoint or cloud services it can cost more.
On shared hosting there are limits to what you can do and the amount of traffic you can process (even though they say "unlimited", this isn't exactly true). I've found them to work just fine though for my own ASP.NET and WordPress/PHP testing.
Having gone through this exact learning experience myself I have two suggestions for you.
First, if you want to learn on the Linux side of things (PHP and MySQL) use easyPHP. I have worked with a good number of WAMP distributions (for running a simple test web server on your own computer) and easyPHP is by far the simplest setup. Also, download the Netbeans IDE for PHP. It is in my opinion, the best IDE for PHP development.
Now if you want to develop in ASP.NET this is all simplified because you can download Microsoft Visual Studio Web Developer Express which has it's own test server built in and is pretty simple to start learning with, seeing as how there are hundreds of tutorials out there for .NET development beginners.
Whatever you do though, don't waste your money on buying a domain and a hosting service unless you actually are planning on throwing up a live website in the immediate future. Save yourself the time and money.
I'm with those who recommend using your own computer. I'd modify it a bit though. I'd say use a spare computer. Call it a scratch computer, or a crash-and-burn computer.
It is a great freedom to have a computer where you don't care if you erase the whole disk, where in fact you do that a few times as you "get your house in order."
The back end technology for websites varies drastically among platform and language. You can custom build your entire application in languages like PHP, use an MVC framework like Ruby on Rails, or use a development stack like ASP.NET or JSP.
Depending on your skill and comfort level (with SQL, HTML, CSS), doing things the (non framework) PHP way will arguably pay off the most, simply because of how much you have to build from the ground up.
If you want to become a professional independent web developer, learning something like Ruby on Rails will pay off more, because after you've learned the technology you can rapidly build websites.
On the flip side- If you want to play with .NET technology, Visual Studio will host ASP.NET webpages on your local machine for debugging purposes. The ASP.NET way of building websites is also fairly different from the PHP or Ruby way.
"TEST LOCALLY, Host Remotely"
Download something called XAMPP from Apache Friends onto a local Windows box. This download has EVERYTHING you need to begin playing around with web development on your own local box, and it is ALREADY CONFIGURED PROPERLY BY DEFAULT. It's trivial to install, and trivial to begin testing/working on your own website!
Then get a good book on PHP for Web development. Anything on Amazon's top list for PHP would be just fine. Look for a book that matches your programming skill level, and start hacking away at your own "site", without worrying that you'll mess anything up!
After a while, you'll probably get a neat idea for a "real" website, and after you try it out on your own computer you'll want to push it to "the Internet". At that point it's just a question of whether you want to go through a free/add-supported hosting company, or a simple/low-cost hosting company. There are many good ones to chose from!
So I recommend that you install XAMPP from Apache Friends onto a local box, and start programming (today!) in PHP.