Taxis from JFK Airport to Manhattan leave from the taxi ranks outside of the arrivals halls. Airport taxis are regulated, so only take yellow taxis from JFK airport.
A taxi from JFK Airport to the city center will cost $45 plus any tolls you encounter en route to Manhattan. Prices are fixed on a “Flat Fare” program for taxis to and from Manhattan, so you shouldn’t pay more than the set fare plus tolls. There will be information inside the taxi explaining the rates.
Be aware that traffic on the roads and highways from JFK Airport to Manhattan can be very bad in the morning and evening rush hour periods, and even at off-peak times and on weekends.
If your flight arrives between 7 and 9am or between 5pm and 8pm, consider taking the subway or Long Island Rail Road to Manhattan.