To some degree, the best answer may be based on what programming languages you have already learned.
In general, though, I suspect most of the web sites out there developed by freelancers are based on PHP, and most commonly a MySQL database. (The specific database is probably not a big deal as long as its SQL-based, since SQL is pretty much SQL from DBMS to DBMS, with some minor differences.)
If you've already learned some object-oriented languages and are comfortable with that style of programming, you might find Ruby (the language) on Rails (the framework) worth a look. It's not in nearly as wide a use as PHP, but does have a strong community and the Rails framework is quite useful and well supported. (PHP has several different web frameworks available, which gives you the bonus of choice with the negative of less commonality between them.)
You can find support for PHP on almost any web host, Ruby is probably supported (or can be installed) on most Linux hosts (not sure how prevalent it is these days on Windows hosts -- but who wants to use that anyway? ).