New York is not one of my favorite places to go, so I am more likely passing through by connecting at an airport there than going to NYC itself.
I do not find any of the three NYC airports to be among my favorite, but Newark is at least tolerable, JFK is a total pit, and LaGuardia is in between. Newark does have a train from the airport that goes into the city, and I would use that in preference to a taxi. JFK, I think does so as well now, but I recall when the public transportation from JFK was taking a bus all the way or taking a bus to connect with the subway. I had one time that I planned to at least spend a little time in the city since I was there, but it was cold, windy and rainy so I decided to go to the airport early. That was lucky because I had the bus ride from hell to JFK, taking three and a half hours due to really bad traffic. Most on the bus missed their planes, but I was able to make it to mine.