Yes, JFK Airport has public transport into New York City, and there are two real chains: AirTrain JFK plus the subway, and AirTrain JFK plus the Long Island Rail Road. The subway chain costs $11.75 in total and takes roughly 1 hour to 1 hour 30 minutes into Manhattan, and the rail chain costs $14.00 off-peak or $16.00 at peak and takes roughly 35 to 50 minutes to Penn Station. Both start with the same AirTrain ride, and the choice is between price and speed.

The two chains, with fares and times
AirTrain JFK costs $8.75, paid when you exit at Jamaica Station or Howard Beach Station. From Jamaica, the subway chain is the E, J, or Z train into Manhattan, $3.00, for a total of $11.75, roughly 1 hour to 1 hour 30 minutes depending on your Manhattan destination. From Howard Beach, the A train runs into Manhattan on a longer route, so Jamaica is usually the faster subway exit.
From Jamaica, the Long Island Rail Road runs to Penn Station in roughly 20 to 25 minutes, $5.25 off-peak or $7.25 at peak, for a total of $14.00 off-peak or $16.00 at peak including the AirTrain fare. That is the fastest public-transport route into Midtown, and the one to choose when time matters and you can afford the extra few dollars. Local buses also serve JFK, including the Q3, Q10, and B15, at the standard $3.00 bus fare, but they are slower and suit a nearby Queens destination better than Manhattan.
What to allow for
Allow a buffer at Jamaica, because the AirTrain-to-train transfer is where a tight connection breaks, and check the timetable late at night, when subway and rail frequency drops. For a group, for heavy bags, or for a destination far from a subway stop, a booked car door to door, with the total fixed in writing, is often the better trade, and the JFK-Manhattan booked-car economy fare is $65. Book online at jetblacktransportation.com/p/reservation/ or call +1-646-214-4828.