It is fairly easy.
You need to get inside the PC case, which normally means undoing a few screws.
The CD unit is held in by 4 screws, 2 each side.
On the back of the unit are the power cable and the iDE cable. Both are easy to remove.
Once the screws and cables are removed slide the unit out (forward, out of the case).
Slide in the new unit, connect the cables, and put in the 4 screws.
The only thing that may confuse you is the master/slave setting at the back of the CD drive.
A CD drive is either set as a master or slave. Make sure the setting of the one you put in is the same as the one you take out.
To change it you move a small jumper on the back of the CD drive, See picture here:
http://www.pasarlascanutas.com/DVD/DVD_05.JPG
There will be a small diagram on the CD case showing how to set master or slave.
Here is a picture from a hard drive, but the one on the CD will be similar.
http://www.pcbuyerbeware.co.uk/HDDConfigChart. gif
When you are doing it:
Make sure you remove the PC unit from the mains supply.
Make sure you dont lose the screws, or get them mixed up.
Make sure you dont lose the small jumper
Write down a diagram where the cables go BEFORE you unplug then.
Here is some instructions that may help.
http://www.fonerbooks.com/r_cd.htm