If you intend to do a fair amount of travelling and your stay is <3 weeks, it may be worth getting a JR Pass[1]. It doesn't work for all lines, but does include the Shinkansen and several of the major inner-city lines. Buses too.
Probably not worth it if you're only visiting one city as the pass is quite expensive. There are regional tourist passes though.