Use drum replacement. Drum replacement is a process by which a recording of percussive sounds is converted into MIDI data that a drum sampler can use. For example, professional studio engineers will often record a live drummer and then use a drum replacement application, such as WaveMachine's Drumagog or Toontrack's DrumTracker, to completely replace the recorded sounds with sampled drum sounds. All of the major digital audio workstations, or DAWs, include this functionality. You are not limited to using recordings of an actual drummer's performance -- even a recording of a beat tapped out on your desktop will suffice. This method perfectly preserves the recorded performance, overlaying the drum samples of your choice.
Use a drum pad MIDI controller. Drum pad MIDI controllers have a selection of rubber pads that trigger the assigned drum samples when struck, making it possible to record a performance in real time. This will give the recording a realism that programming a drum track directly into a MIDI editor will rarely achieve. People who've become very good at drum pad performance can create performances nearly indistinguishable from that of a real drummer, but getting to this level will take practice. Some examples of drum pad MIDI controllers include the Korg nanoPAD, the Akai MPC series and Native Instruments Maschine.
Use humanization features in your drum sampler plug-in or DAW. Humanization is a feature common to most DAWs, MIDI editors and drum sampler plug-ins. In essence, humanization makes very machine-like MIDI drum lines sound more "human" by slightly off-setting them from their programmed position. This alleviates rigidity in the drum line, making it sound less precise and more like a performance by a live musician.
Learn about drumming. A key element to producing realistic-sounding drum lines using plug-ins is an understanding of the way in which acoustic drums are actually played. For example, it doesn't make sense to program drums in such a way that the snare, hi-hat top and cymbal are all triggered at the same moment -- this would be physically impossible for a real drummer to do without an extra arm. By learning the basics of drum performance, you will avoid this and similar mistakes, greatly enhancing the perceived realism of your drum lines.