I would also suggest before buying or renting an apartment try to visit the apartment during the day and also evening and night if possible. In NYC you can live on one of the busiest loudest streets but if your apartment faces the back it can be very quiet.
Long Answer: Depends on the floor and the block, but i'll give you tips on what to look out for:
1) Hospitals - there are blocks in NYC that are "ambulance blocks" i.e. fastest routes to Emergency Rooms
2) Floor - the floor you live on though, can make it a moot point. You can live on an ambulance block, but be on the 6th floor and never hear it.
3) Buses are on the avenue's - the buildings are generally set back in some areas, like the upper east side, but older properties, even in the upper east are right up on the street.
4) When are you home? - Generally traffic in certain areas is limited to certain peak times, this can vary, the usual "rush hour" times, are worse or longer in certain 'hoods.
So, basically there is noise all over NYC, hey we are, "The City that Never Sleeps" - but the situation can be averted by being on the right floor, the back of a building, or off the beaten path.