There is rarely enough room for such prolonged flights indoors. There are any of 3 things you might be asking about so I'll briefly mention each.
1) Teaching the parrot to fly away from you. I call this "go to perch." I face my parrot toward the perch I want it to fly to and point. Then I say "go to perch" and hopefully the parrot flies to it without me moving a finger. You can see a bit about how go to perch flights are taught in this video:
http://www.youtube.com/watch?v=--2I9nyziM8The technique is pretty simple, you start moving your hand toward the perch you want the bird to go to and stop. The momentum carries the bird off your hand and then it has no choice but to fly there. You should reward when it lands on the perch as well as saying the cue every time at first. Eventually you can put landing on the perch on a variable ratio of reinforcement and not have to throw the bird any more.
2) Boomerang flights. This is where the bird flies away and then flies around and back to you. This can be taught by flying the bird in unlandable areas and it is forced to come back to you. It can also be done by a sort of target method by teaching it to fly around certain objects. For example if you teach it to fly through hoops, you can set the hoops up in such a way that they take it in a turning course and back to you. Eventually put it on cue and take the hoops away. Or if the bird is stupendous at recall, then recall it while it is flying away from you and it will turn back and land on you.
3) Freeflight. If you're talking about the videos you've seen where people launch their bird and it flies nonstop a few minutes before coming back, you can pretty much forget it unless you can fly your bird in a gym or something.