Central Princeton is small and walkable — from Nassau Street to the battlefield is a 25-minute walk, and most visitors do not need any transport during the day. The Princeton University campus is closed to non-residential traffic and is best explored on foot anyway.
For longer trips inside town, the TigerTransit university shuttle is free, frequent, and open to the public — useful for getting out to the Graduate College or the Institute. NJ Transit buses run along Nassau Street to surrounding towns. Cyclists will find Princeton manageable on quiet streets, less so on Route 206 or Route 1.
Cabs and Uber are easy to find. If you are doing the Princeton Battlefield, Institute for Advanced Study, and Drumthwacket in one half-day, a car is more efficient than walking the whole loop.