Make sure the PC is OFF and unplugged from the wall when you do this. Touch the metal of the case frequently. Typically there are either two side covers on your pc or a one piece that goes over the top. Remove both side covers by taking out the rear screws and sliding them backwards and off. The onepiece usually has 3 screws and tilts up from the back end and then pulls off rearwards. The cd drive is held in by 4 screws, 2 on each side. remove the 2 cables in the back. Unscrew the screws and slide the drive out the front of the unit.
Odds are this is an IDE drive so you want to check the master/slave jumpers and set the new drive up the same way.
Install the new drive in from the front. Screw it down when the face of the unit lines up right. Plug in the two cables.
If you have room, boot up the PC without putting the covers back on and make sure everything works. the shutdown and put the covers on once you're good.