Listen to the beat that you'll be using before you start writing. This can help you organize your thoughts lyrically, and get your mind used to the structure of the beat.
Write a 16-bar verse that goes with the beat. Make every two bars of the verse rhyme with each other. The rhyming words don't have to be exact rhymes; they can simply have similar sounds.
Synchronize your flow to the drums and bass. If the beat has a break or a double-beat in the middle of a bar, use this break to catch your breath and align yourself with the beat again. Use this technique to emphasize a word in the front half of the bar, and another in the back half of the bar. This will add to the overall cadence of your delivery.
Adjust your words to fit changes in the beat for maximum effect. Play with the words by making them longer or shorter. Accentuating unexpected syllables is a dramatic way to draw attention to what you're saying.
Keep going, even if you make a mistake. If the beat runs out before you've finished your bar, continue flowing into the next one.