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.