Yeah pretty much it takes practice. Eventually you build a "bank" of rhymes and lines. So yeah for sure, freestyle is in a way "pre-thought" out.
Still, freestyling is definitely hard. Just try it. Run an instrumental in the background and see how long you go. Then add layers like freestyle battling (with or without beats).
That video of Wax was awesome though. He's got flow and he just hammers out line after line for like 4 minutes!
Here's some fav's of Eminem showcasin' his true talent. Like Wax, he's got flow and lines..
..and Tom Green!
"You got flow dog! You got flow!"