They are not cheap.
There's different brands, different models, etc. So first of all, you'll have to decide what exactly you want (how should you know? i know... hehe).
I got an MPC500 from Akai. It's the smallest model available from them, but still costs about 450-500 Euro over here. The next bigger model is the MPC1000 which is around 800-900 Euro. Then comes the MPC2500... etc.
If i had to make the choice again, i'd save up a little more and go for the 1000 at least. Not that the MPC500 wouldn't be good... but compared to its bigger brothers, it has a very small display (you have to do a lot of things by ear on the 500, like trimming samples for example).
You can connect them to almost anything.
They have MIDI ports (in/out) aswell as Stereo-Jack in- and outputs (L/R). There's a phones output too.
To load samples from your computer, you connect it with an USB cable (only for data transfer). Then you can assign the different samples to the pads of the MPC and play with them.
What you play with the pads can then be recorded into sequences, which contain various tracks (beat, instruments, etc). Later on you can arrange your sequences into a complete song.
Example: Sequence 01 is your intro, Sequence 02 the verse, Sequence 03 the hook, etc.
You can connect a keyboard, a turntable, your ipod, a microphone, basically anything with an audio output... and record it with the MPC, then cut the samples, and use them.
The list of what you can do with an MPC is long. And the list of what you can do with a computer and software is even longer. The question is what do you prefer?
I've tried a few programs for sampling and making beats, but i just can't do it on a computer... it ruins the fun for me. That's why i took the hardware route. I have the MPC, a digital piano, a few guitars and an e-bass. I enjoy playing/using all those instruments and the MPC very much. The computer i only use to record. It's the right way for me, but not for everybody.
One thing is for sure tho... buying hardware and instruments is expensive! I could have bought a decent small car for the money i've spent over the years. It's a good thing to try out software first (because you can do that for free pretty much). Otherwise you'll be buying stuff, and then find out you'd actually have preferred to do it with your computer. This goes mainly for sampling, if you want to play an instrument, no computer will ever beat a real guitar, piano, whatever.
It's a big topic, so i'll stop here.
But feel free to ask more if you would like to know something in particular (i'm no expert, but have collected some experience over the last few years).