Taking the subway from JFK Airport to Brooklyn, New York is a two-step process.
First, follow signs in JFK Airport to the AirTrain. Once you get to the train platform, take a train heading to Howard Beach station. Do not get on a train to Jamaica station.
Once you get off the train at Howard Beach station, you can purchase a Pay Per Ride MetroCard that covers the cost of the AirTrain ($5) as well as your continued transport to Brooklyn. The cost of the card is $7.25.
Using the card, go through the turnstiles and take a left. Go down the stairs to the platform and wait for the A Train. The train will take you from the Howard Beach JFK Airport stop all the way to Brooklyn.
If you want to get off at the last New York subway station in Brooklyn, alight at the High Street stop. Otherwise get off before the High Street stop.
The total journey time on the subway from JFK Airport to Brooklyn is around an hour, but can take longer depending on how long you have to wait for the trains to arrive.