Fastpasses are available for all park guests. You use your park ticket in the fastpass machine and the machine spits out a ticket. The ticket has a returning time on it, and you can return to the ride at that time and use a seperate line just for fast pass holders. It moves you almost all the way to the front of the line.
The earlier in the day you get a fast pass, the sooner the return time. The more popular the ride and the more people getting fast passes, the later the return time. They only hand out a specific number of fast passes for a certain time, and once they hand them out, they move to the next time frame...it's an hour window. Once they are all gone for the day, they are gone.
You may only have one fast pass at a time and can get another after you use your current fast pass or it expires.
Sometimes you have the opportunity to get more than one, if the park is extremely busy, they will set up an area where a cast member will hand out the passes. For example, Flights of Wonder at Animal Kingdom and Who wants to be a millionaire at MGM will both occationally set up tables to monitor the flow of guests. This is a touch and go thing though, they don't always do this.
Hope this helps!