Flocabulary, WikiHow and LiveScience.com are good resources for learning how to rap freestyle rhymes. They provide tutorials as well as examples of how established rappers create freestyle rhymes.
Flocabulary provides a ten-step technique for learning to freestyle rap. Its most important points are starting easy, using metaphors and commenting on things currently happening. WikiHow provides additional suggestions, such as listening to other freestyle rappers and practicing in front of friends. LiveScience.com takes an approach from the natural sciences by analyzing what happens on a neurobiological level when Eminem raps his freestyle rhymes, providing a scientific account of freestyle rapping as a form of improvisation.