Open a DAW that is equipped with a MIDI editor. Anvil Studio is one example of a free DAW with MIDI editing capability.
Create a new MIDI track.
Add a drum instrument to your MIDI track. Most DAWs have a built-in bank of drum samples for you to choose from.
Determine what MIDI notes correspond to what drum sounds. If you have a MIDI controller, play the MIDI controller to determine the drum layout. If you do not have a MIDI controller, most DAWs allow you to use your computer keyboard as a MIDI controller.
Click the "Record" button on your DAW.
Play the drum notes you wish to include in your track.
Edit your notes in the MIDI note editor for the MIDI track. The MIDI note editor looks like a virtual piano keyboard with a grid attached to it. You can change the duration and pitch of each note. Here, if you change the pitch of the note, it will alter the drum sound accordingly.
Quantize the track if you want your notes to correspond exactly to the metronome of the track. If you want a human, slightly off-time sound to your drum track, do not quantize it.