Although your in studio drum machines like the Alesis SR-18 and the Boss DR-880 are probably the slickest way to go when it comes to firing up a loop for some rhythm practice or song jams, there are other alternatives out there. And, best of all they're 100% free...
A lot of people ask me what I have found online for free drum machines. And, which ones (if any) are any good. There are only a few of them and not every online drum machine is easy to use or has the perfect set of features & drum sounds. But, there are a few I can recommend checking out.
For a nice piece of software you can run on your desktop or laptop, I'd suggest Hydrogen. It's a fantastic piece of free open-source software that can work very nicely as a quick drum machine for all your at home jams. Check out the demo video below...
Next, (if you are not interested in installing any software), you can visit the One-Motion Flash based online drum machine. It'll do pretty much everything you need to do. My only complaint is the Tempo control. They've designed it instead as a slider control and it has no b.p.m., (Beats Per Minute), indicator. So, therefore you're at a total loss for knowing what tempo you're really jamming at. Perhaps not a huge deal to most people, but I'd prefer an actual tempo control listed in b.p.m.
Finally, there's the Gieson Drum Pattern Sequencer. You'll likely need some time with it to get a handle on this one, but it's a fairly capable drum pattern generator, with decent sound as well. This one does have a tempo indicator in b.p.m. (yay), and a cool feature for adding more loop space (good for 5/4 and other signatures).
Be careful though, because it's default open page-load is set to 5 measures. Just use the "+" and "-" controls on the lower right to add or subtract individual beats.