Wrote this as PM to answer someone's question, figured that since I wrote so much, I should just copy and paste into a tutorial:
Short answer is just to plug it in. Usually it is simply a matter of plugging in the ribbon cable and the power connector, and resetting the CMOS. But there are a few finer points. First, understand that your computer bios (the programming of the motherboard itself) does not see any difference between a hard drive and a CD/DVD drive. Occasionally, adding or replacing one can cause confusion for the bios.
To help prevent that, look on the back of the drive. You should see a row of pins, with a small black or white clip (jumper) connecting two of them. Either on the back of the drive the pairs will be labeled, or on top of the drive will be a diagram, showing which placement of the jumper causes which status. Some times they are only initialed, so the choices are "Master", "Slave", or "Cable Select". Almost any should work if you only have one hard drive and one CD/DVD drive.
If you have more than one of any of these drives (two hard drives, two burners, etc.), you may have to experiment with which position to put the jumpers on this and the other drives. It's pretty self explanatory (in theory at least) boot drive should be "master", second drive should be "slave", etc. "Cable Select" is usually a good option. If it is coming from a different machine, try it as-is first. If you a replacing an old one, see how that one is set.
If you need to change the jumper position tweezers will make your life much easier. Occasionally you may also have to change slot where the ribbon cable is plugged in, or swap ribbon cables from one drive to to the other, or where on the cable they are plugged in. Some boards have more than one slot for drive ribbon cables, and some cables have more than one connection on them. Hard drives and CD/DVD drives all plug into the same type of slot/cable. So one system may just have one slot on the motherboard with both the hard drive and the CD/DVD drive on the same cable, while another could have two slots with two hard drives on one cable and two CD/DVD drives on the other, for example.
When you open your case, or change any connections, make sure the computer is unplugged. Also, while unplugged, after you put the new drive in, or after each new configuration you try, take the little watch battery out (CMOS battery), wait a few seconds, then put it back. This battery powers the part of your system that keeps track of your hardware and date/time settings when the computer is unplugged. Removing the battery resets the CMOS. There is a jumper configuration on the mother board that will do this also, but it is almost always easier to just use the battery, especially if you do not have the manual for the motherboard. You will have to reset the time/date, and the computer will take longer to boot the first time because it is relearning the hardware of your system.
On rare occasions you may also need to go into the bios and change a setting, such as "enable Auto Detect". Be careful, and remember any changes you make so you can undo them if you need to. (Although there is usually an option to restore default settings.)
Don't let all of the above intimidate you. Usually you just have to plug in the drive, reset the battery, and it works fine.
The ribbon cable usually can only plug in one way; look for the missing pin in back and match with missing hole on cable. If these are not present, then plug cable in with the red edge towards the power plug. This needs to be done gently, do not bend or break the pins on the back of the drive. (On some cables the stripe may be blue or black instead of red.) On VERY rare instances I have seen a ribbon cable that needed to be plugged in with red stripe out. The symptom for that would be a power indicator light being on, but the computer not "seeing" the drive, either in the bios or under "my computer" in Windows, although jumpers and cable/slot position can cause the same symptom. To tell for sure, look for a "one" or an arrow stamped on the drive case. The pin it is stamped above is pin "one", and the red stripe goes there.
The power connector should only fit one way as well, with round corners on either top or bottom. If this does not apply, then it is USUALLY red wire towards ribbon cable. Many drives have an indicator light showing power. If it does not light when computer is on, then it is wrong, loose, or the power plug is no good. Most computers will have extra, unused power connectors, try one of those. You can usually hear the drive at start up, too.
ASIDE: a faulty power connector going to the hard drive can be the cause of many problems on a computer, such as sudden shut down, running slow, etc. If you have a hard drive issue, try using a different power connector or testing the power supply before buying a new hard drive.)
If you fire up the computer and it says "no operating system found", won't boot into windows, or just stays a blank screen, then you will have to experiment with jumpers, cables, etc., as described above.
As for drivers: if it is just a cd/dvd reader you won't need drivers. If it is a burner you will. Your operating system may or may not find the drivers by itself. Windows Update (if you are using Windows) may or may not have them. The manufacturer of the drive may or may not have them. Occasionally there will not be drivers available for that burner for that operating system. But it will still read the disks, just not burn.