In order to connect a laptop drive up to a desktop, you need a 44-pin (laptop) to 40-pin (desktop) adapter.
They cost about $7 at an electronics store.
That said, read the following carefully before attaching the laptop drive to the desktop:
First, the IDE cable and the connector must mate - some IDE cables have a pin block in place. If the adapter does not have a missing pin, you will need to remove the pin block, or get a different cable.
Next, turn off and unplug the computer.
Next, connect the adapter to the IDE cable. It is a little counter intuitive - the power connector on the adapter goes on the opposite side of the cable from the colored stripe on the cable. Don't mess this up, or you will fry the laptop drive.
Now connect the laptop drive to the adapter. The connector on the adapter is offset, and the bottom of the laptop drive goes toward the edge the connector on the adapter is closest to.
Connect the IDE cable to the desktop in place of the CD-ROM drive cable. If you are using the CD-ROM drive cable, disconnect the CD-ROM drive from the cable.
Connect power to the adapter (it uses a standard power plug, and you can use the one from the CD-ROM drive).
Plug in and turn on the machine. Depending on your setup, you may need to go into CMOS to tell the computer to look for the drive - otherwise, it will be recognized automatically.