From JFK Airport
JFK is the largest of the three and sits in southeastern Queens, roughly 15 miles from Midtown. You have more choices here than at any other New York airport.
AirTrain plus Long Island Rail Road
The AirTrain JFK links every terminal to two transit hubs. Ride it to Jamaica Station, then catch a Long Island Rail Road (LIRR) train to Penn Station or Grand Central Madison. The LIRR leg is usually around 20 minutes, making this the fastest reliable route to Midtown at most times of day, and it avoids traffic entirely. You pay for the AirTrain separately from the LIRR ticket; check current fares, and note that LIRR fares are higher at peak times.
AirTrain plus subway
The budget option. From Jamaica Station, the E train runs to Midtown and the J and Z serve Lower Manhattan; from Howard Beach, the A train runs through Brooklyn to Lower Manhattan and up the West Side. It's the cheapest way in, but it's slow, often an hour or more to Midtown, and hauling big suitcases through turnstiles and up subway stairs is hard work.
Yellow taxi
Taxis wait at official ranks outside each terminal. Trips between JFK and Manhattan are charged a flat fare set by the city's Taxi and Limousine Commission, plus tolls, surcharges and tip. Travel time depends heavily on traffic: it can be well under an hour late at night and much longer at rush hour. Only use the official taxi line, and politely ignore anyone offering you a ride inside the terminal.