How does it work?
You go and stay in the queue for the taxi, usually just outside the terminal. When it's your turn, you get inside the taxi and tell the driver your destination. And than you ride in (sometimes smelly) taxi for a while (for a long while) and eventually you get to your destination.
How can I recognize it?
You won't miss it. There will be signs with directions, as well as the sign where the queue starts. Also, there is usually quite a lot of people queuing for the taxi.
How can I recognize a legit taxi?
Although it never happened to me, some people may ask you if you need a taxi INSIDE the airport terminal. Avoid them, they are not legit. Head to the exit, search for a man or a woman with a little printer and dressed in uniform. (credits to @Napolux for the information)
Once you are in official taxi queue you don't really have to worry about taxi being legit, but you can still check taxi medallion. It will look similar to this and will be attached to the bonnet (aka hood if you are American) of the car. Additionally, there will be numbers inside of the taxi.
You can check the number here: http://www.nyc.gov/html/tlc_medallion_info/html/tlc_lookup.shtml
How much will it cost to take the taxi from JFK to Manhattan? Is there a fixed fare?
There is a fixed fare, JKF to Manhattan is $52 + tolls + tips. Payable by card or cash.