If you want to do freestyle rapping, then all you need is an idea of what you want to rap about. At first, it doesn't matter what you're saying, all you have to do is to let the words come forward and keep going. As you get better, you can incorporate poetic techniques and tools like metaphors, similes, wordplay and puns. Check out the details on www.ehow.com/how_2034496_freestyle-rap.html.
Choose a beat, then make up some lyrics to match it, or you can twist around the song's words to make it about something else. For instance, one guy on YouTube remixed the song "I believe I can fly" and it starts off normally then goes to say he wanted "chicken wings so he went to Burger King" another person remixed trapped in the closet to some guy and his wife going to get some sandwiches and in the end he forgot the onion rings. (That one is pretty funny).