Basically there are three connectors; power (obvious; 4 pin molex from power supply), the IDE ribbon (again obvious; big mofu ribbon to mobo) and the analogue; this will connect somewhere on your mobo*, if you're replacing a drive then just leave all things connected at the mobo side and disconnect them from the drive end.
* The analogue can also be hooked up to other devices like sound card or modem (which in turn can be interconnected just to confuse) which can be spooky but most motherboards will have a socket or three, on my mobo these are nestled between PCI slots, they're quite small with only a few pins, the cable is round and usually grey
If you're using it as an additional drive the analogue you need will be next to the other CD drive's connection obviously. Normally one analogue is master so if you change those things - via jumpers at the back of the drive - remember to switch analogue's too.
That's about as complicated as I can make it