The country code for Japan is 81; the city code for Tokyo is 3. When in Tokyo, omit the city code; if making a call to Tokyo from outside the city, dial 03 from outside the city (adding a 0 before the city code is standard procedure for all calls between cities in Japan).
Public telephones are located everywhere. They are color-coded, and accept only certain types of coins (check before using). Gray phones accomodate international calls and accept ¥10 and 100 coins. Prepaid phone cards are also available at many locations.
When dialing internationally from Japan, either follow the instructions indicated on the public phone or hotel phone. Generally, you will dial an access code followed by the country code and phone number. Hotels generally provide detailed instructions for using their systems.