Prepare your work space. Give yourself plenty of blank measures on a clean sheet of manuscript paper.
Listen. Do not try to write while listening. Just listen.
Listen again. Try to pick up the beat and determine whether it is divided simply (into two pieces) or compound (into three pieces).
Determine meter by listening for patterns of strong and weak beats. Also listen for rhythmic clues such as longer notes (often, but not always, on strong beats) and harmonic changes accompanying the underlying melody (most music changes chords at a rate of one chord per measure). Come up with a logical meter signature.
Verify your meter signature by singing or listening to the rhythm again.
Listen again. Take a shorthand rhythmic notation as you listen or sing back the melody. Make sure you jump to each new measure as it occurs. If you get stuck in a measure, skip it and go back to finish it up on the next hearing.
Translate your shorthand notation to standard notation.
Double check your answer by singing what you have written and comparing it to what you remember.