If you mean a normal drum machine, almost all of them have MIDI and can be used as either controllers or slaves when connected to your computer. Also they all come loaded with rhythms, so you don't have to worry about learning to be a drummer.

Good drum machines can be had for $150-$250. Alesis is a top seller, I like Roland, nothing wrong with Korg, Yamaha, or even Zoom
AFAIK.