Set up a MIDI track for recording, selecting your desired sound and tempo. Be sure to record to a metronome so that your program will be able to quantize your notes correctly.
Set the scope for what beats you want your notes to snap to. They can be snapped to the nearest beat, half beat, quarter beat, eighth beat, sixteenth, thirty-second, sixty-fourth and so on. Quantizing to the nearest sixteenth is generally the most useful, but to capture more rhythmic nuance of your original take you should experiment with quantizing to smaller subdivisions. If you are recording a track that is supposed to be perfect eighth notes or quarters, such as a steady kick drum or minimal bass line, try quantizing to the nearest eighth or quarter note.
Set the swing for your notes. Most MIDI quantizers are designed to snap the notes of a track to an evenly spaced grid, which generally works fine for dance and for some rock or hip-hop but can lead to problems if you are working on a song that is meant to "swing," a rhythmic feel that is most commonly found in jazz but can be desirable in any genre depending on what you are trying to do. Swinging is when the "in-between" notes, those that fall between the eighth notes, fall slightly behind the beat. On a computer screen this means those in-between notes fall slightly to the right of where they normally would. Most sequencing programs have a "swing" setting, by which you can control how late you want these in-between notes to fall.