There is regular shuttle service to the LIRR station which is just in back of the airport. Runs every 5-10 minutes. The train is about an hour ride into the city. Less to the Jamaica station.
I did this once, won't do it again. I can get from BWI to NYC on Amtrak quicker than I can get from NYC to ISP.