Like others have said, don't rent a car if you're planning to stay mostly in Manhattan. The subways and buses will get you everywhere you need to go (Check
http://www.mta.info for maps and service changes), but READ THE SIGNS on the subway. You don't know how many times I've seen tourists and non-tourists alike ride the downtown train into Brooklyn when they intended to go uptown to Times Square. It's probably a good idea to take a look at the maps (there's a PDF on that website or get them free at any subway station) to figure out where you want to go before you actually head out. For the most part, Brooklyn, Queens and Bronx are accessible using public transportation as well, but Staten Island, NJ, etc. may require a car.
Subway and buses are $2/ride with free transfers between the two. If you'll be taking the subways a lot everyday, the unlimited ride metrocards might make sense. The $10 metrocards actually have $12 on it (1 free ride).
In my opinion, NYC is actually very safe at night along the popular tourist areas (beware of pickpockets though). But even I would avoid travelling into the Bronx, Harlem, Lower East Side and lesser known areas in Queens and Brooklyn at night.