Apache is a web server. You are more than likely going to be looking into mySQL as the database server.
If you want to control web output from a database you will need some kind of server scripting language, like PHP.
So look at installing mySQL, Apache, PHP in that order and read the docs before doing so. It is well explained how to set these up, so read first, install, then if you have any questions you can post and ask.
To help you out:
www.apache.org <-- Most common on webhosts: 1.3.29 or .30 (where ever is current), but 2.x.x serires is just fine. www.mysql.com <-- go with 4.0 series. 4.1 is still beta if I can remember. www.php.net <-- php5 is now in production mode. You can install this, but if you are going to be messing with prebuilt applications, like a forum, read their info about php5 as most applications work on php5, but some don’t. Otherwise use 4.3.x, which for the next month or two, most hosts will still use.
My recommendation if you are building applications for web, and plan on hosting them with a company that you do not have control over what is installed on it, is to work closely with the versions they have installed. You can work with whatever version you want, I currently use php5 at home on my dev server, but knowing that if I upload any php scripts that use php5 functions, it will crash.
There are some significant changes between versions of servers, some you might never notice, and others that you can’t live without, so going backwards compatible can be a headache.
But if you are just learning than stick with what works best for you =)
Just a note on the posts above: You should install those in the order of Apache, PHP, MySQL. And also to be sure, download the versions of those which says stable release.