The drum machine started out life in the late sixties as an accompaniment to the home organ, playing a simple rhythm for the musician to play along to. While a useful addition to the organ, it had little use in the studio as it sounded nothing whatsoever like an acoustic drum kit and could only play a handful of rhythms chosen by its manufacturer.
By the early eighties, the analogue drum machine had evolved considerably. It was no longer a part of the organ, but an instrument in its own right. Its various sounds could be tweaked — the snare drum made snappier, the open hi-hat given a longer decay, and so on — while maintaining its distinctive character. More importantly, it could be programmed by the musician to play new rhythms, which opened it up to new musical genres. Another feature that made it more studio friendly and more professional was the inclusion of a separate output for each of the parts of the virtual drum kit. This enabled musicians to use different effects, such as delay and reverb, on each part of the kit, and allowed each part to be equalised seperately. Despite all these useful features, however, it still failed to sound even remotely like an acoustic drum kit.
Meanwhile, at the higher end of the market, the digital drum machine was released. As it featured samples of real drum kits, it sounded very much like the real thing, and its analogue counterparts became very cheap very quickly. The drum machine had finally become realistic, although it was far from perfect — the sound of an acoustic snare drum alone varies immensely based on where you hit it and how hard, whereas the digital drum machine typically had only one or two snare drum samples. The same was true of most other parts of the drum kit. Realism was attained at a cost: the sounds could no longer be expressively tweaked.
By the late eighties, many composers of electronic music decided that they didn't want a realistic emulation of an acoustic drum kit. What they really sought in a drum machine was a decent sound all of its own: something unmistakably synthetic, with its own character. The secondhand price of many analogue drum machines subsequently rocketed, and remains extortionate to this day. In particular, Roland's TR-808 and TR-909 models are highly sought after, not only fetching outrageous secondhand prices but also being "cloned" by rival companies in an attempt to satisfy musicians' appetites for their sounds.
From the nineties onwards, there have been two main ways to obtain the synthetic sounds produced by analogue drum machines, besides getting enough money together to buy one. To reproduce the sound of almost any drum machine, you can either find, buy or make samples of it. As long as you don't need to tweak the sounds, this method works well as you can emulate a lot of different drum machines using just a single sampler, providing you have the appropriate samples (the Dance Megadrums sample CD is a good starting point).
The other way to get synthetic percussion sounds — in particular, the tweakable sounds of the TR-808 and TR-909 — is to buy a clone. Several exist, including the Novation Drumstation and the Jomox Airbase99, both of which are 1U rackmounts and MIDI compatible, making them fit into a studio much easier than even the originals they are designed to emulate.
In summary, the modern analogue drum machine clones the distinctive sounds of much older drum machines, but is rack mounted and has MIDI compatibility. The digital drum machine is also still in use, but it's pretty hard to identify it as it sounds fairly realistic.