An easy way to pay for your train, bus, ferry and tram ticket is the octopus card. Get it right at the airport if you have a couple of minutes. In the city, you can get it at all the MTA stations, like this one.
Online Page for transport here
Uber in case you need it here
Return your Octopus Card at the airport and get your deposit and the left over money back.