If you mean live freestyling, you need to, as Chet Star said, jot stuff down in a notebook or something. Jot all hot lines that come into mind, while doing anything. You don't have to be brainstorm; if something fire comes up in your head, write it down.
By a month or two, you'll have a considerably large list (hopefully) of decent rhymes to spit out. Say them in your head with a good flow and memorize the ones you like.
When you actually freestyle battle someone, you need to be very quick with your mind and mouth. Analyze your opponent and find ways to attack them. If he's your friend, that should be even easier as you can throw some "personals" at him, which can sidetrack the opponent and give you the edge.
I'm just giving you the VERY bare details of it, but practice is the most important thing.
Also, listen to a larger variety of hip hop to expand your understanding of the rap games and give you more inspiration to your lyrics.
