Boston is a compact city that can be covered easily on foot. Driving is another matter -- the city is famous for frustrating out-of-town drivers. For getting around the Boston-Cambridge area, your best bet is the T, America's oldest subway system. It serves most areas of the city and Cambridge, and several lines head to outlying suburbs.
A water shuttle runs from Logan Airport to Rowes Wharf on the waterfront. Commuter trains go to outlying areas like Concord, and ferries run to several points around Boston Harbor. For day trips beyond the city, you will want a rental car. It is about a three-hour drive or ferry trip from Boston to Provincetown on Cape Cod.