When travelling from the airport to the city on the AirTrain you can pay on arrival. Saves missing a train.
Do you mean the Airport Express? If you have a device which can access the internet, you should buy tickets online from klook whilst on the train rather than paying on arrival. Unless you want a same day return, or qualify for child discount or group-saver tickets.