This is a pretty simple procedure, and is basically the same for any desktop pc. Firstly you need to open the case, MAKE SURE THE POWER IS OFF, find the DVD drive you want to take out, it should have 2 screws on either side or clips. disconnect the ribbon cable carefully. Dont yank at it, if its a little stiff then just wiggle it from side 2 side a little. disconnect the power cable. unscrew the screws and the drive should slide right out. Now on the back of the drive there should be a little connector group with a white jumper on them. in between where the power connects and the ribbon cable connects. Look where that jumper is, then look on the top of the drive, should be a little diagram it will say sometheing like , CS Cable select, Master or slave. Whatever position the jumper is in is where you need to set the jumper for the new drive, Master Cable select or Slave, Not all drives have the jumper in the same position but its pretty easy to identify which setting you need. When you have done the jumper setting on the new drive, slide it into the slot, screw the screws back in, connect the ribbon cable, THE RIBBON CABLE ONLY GOES ONE WAY, if you look at the cable it should have a RED stripe either solid or dashed going down one side of it, the red stripe needs to be plugged in faceing the power suppy thats at the right hand side, If you do this part wrong then you could fry the drive or your pc. WHen you have the ribbon cable plugged in and seated tight, then plug in the power cable. Look at the shape of the connector, it is flat on one side and has 2 rounded edges on the other side, the rounded edges go to the top, you shouldnt be able to plug it in wrong but i have seen it done. Different countries have different colors of cables, if you are in the USA make sure the YELLOW wire is on the outside(RIGHT) in the UK its the RED.
Power back up the computer and you should see the new drive in windows, If you dont then you need to go into the bios and check that the drive has been detected, If it hasnt then its usually the jumper thats giving you the problem.
Heres a video on youtube that will show you how all of the above is done
http://www.youtube.com/watch?v=OkwR89Ag-qM
Hope that helps