Depends what time and to what part of NYC. Not during rush hour (i.e. before 6:30ish) about 1.5 hours. During rush hour, it can be up to 2–2.5 hours.
The train is about an hour and a half, which seems more pleasant than driving.