JR is a rail network in Japan. Before you travel as a tourist, you can get a Japan Rail Pass which may work out cheaper than buying tickets in Japan. To get the pass you can buy it from a local JR Rail Pass distributor outside of Japan. So buy it before you enter Japn. Once you arrive in Japan, you can trade it in at the airport.