Glad you asked
There are a few ways you can go about this, I personally use Pro tools, but some of the methods are applicable to all the other DAWs.
- First is the old fashioned way: you chose a sample that you like, import it into your project, on a track bellow your main track, and then manually drag the sample to each and every hit. Yes you guessed it, this is soo time consuming, it would take you half a day just to replace all the kicks, toms, and then come the snares with all those ghost notes...too much trouble, but at my beginnings, I used to do it this way. Hell, if you're not passionate enough to spend 6 hours on manually replacing the drums then you shouldn't be a mixer n the first place haha kidding aside, there are better methods of doing the same thing.
- Using drum triggering plugins: back in the days, I remember when Toontracks Drumtracker appeared I thought all my drum replacing nightmares would be over. These kind of plugins enable you to either capture the trigger points (these are the transient spots of each hit) and export them as MIDI file, or play back in real-time any sample you load into them, or both. Te problem was that you could easily catch all the transients from say a mic bleed (you analyze the kick drum, but the software also picks up the snare bleed from the same mic). Thats why these plugins have various filters and threshold settings so you could "tell" the plugin at what exactly to capture. The ones you should definitely check out are Slate Digital Trigger, XLN Audio Addictive Trigger, and if money is an issue (it always is) there is a cool vst that does the job pretty good without breaking the bank: ApTrigga3 from apulSoft. You just load any sample you want, put it on a say kick drum track and it will play back in real time. Now the downside to this (apTrigga) is you only have one sample so, it could very quickly turn into a machine gun type of sound, especially on fast consecutive hits.
- My workaround for this is a third method I use, you either analyze the track, by Melodyne and export the information as MIDI file, or I just go manually and enable Tab to transients in Pro Tools (I'm sure Cubase has something similar). So each tie I hit Tab on my keyboard, my cursor jumps to the next transient in an audio file. I open up a midi or an instrument track, place it bellow the audio track, and just draw a single short note. I cut it (ctrl x on a PC cmd x on a Mac) and wherever the transient is I just paste (ctrl/cmd V) the MIDI note. You can automate this process by using an application such as QuicKeys on a Mac, or any similar program on a PC (there are free ones too). Then all you have to do is load up a drum library (I use Kontakt as a vsti host, and there are numerous drum libraries out there to choose from), and so every time a MIDI note is detected it will play back an audio file, but being that most drum libraries for Kontakt are Round robin and recorded at different velocities, no consecutive hits will be the same sounding.
One thing you should always check when drum replacing: PHASE. Zoom in on your original say kick drum audio file and the sampled one, the phase should always be as close to each other as possible, meaning if on one track the waveform is going up, then going down, the same should be happening on your sample. If they are out of phase you should just select all your drum samples and move them ever so slightly to phase align them to the original.
I just hope I didn't confuse you even further rather than helping you out. Once you get the hang of it, and choose the method that fits you the most, you will be drum replacin' in no time For anything you may have not understood or need a detailed explanation how it works just send me a message and I'll get back to you