Your best bet is to order a replacement drive from Dell, as their machines tend to be specific in what they can run.
There should be a small hard drive symbol on the bottom of the laptop. There should be 2 or 4 screws nearby. After removing the screws and taking off the plastic panel, you should see the hard drive. Disconnect the connectors that connect the hard drive from the laptop and remove it.
Just do the opposite to put it back together. You'll have to reinstall the OS at first boot by booting from the CD-ROM drive.
And it's also worth noting that 840s use IDE hard drives (aka ATA, not SATA). A 120GB IDE drive will run about $49, slightly more expensive than comparable SATA drives.
If you do end up ordering from Dell, just give them the service tag from your laptop, and they'll match you with the best possible drive.
As buwish has already pointed out, you'll need a Windows XP installation CD for your new hard drive, or take it to a reputable computer repar company for them to install it for you. The latter will likely be more expensive though.