Japan is a very easy place to travel, and while the rules of courtesy a local needs to follow on a day-to-day basis is mind boggling, honestly as a traveller you don't need to know that much.
Assuming you're from a Western country, follow all the basic rules you would normally follow at home, plus a few more:
- Dip your head: Japanese people bow to each other all the time (and there are a LOT of nuances about how deep you need to bow). The good news is, travellers do not generally need to follow these rules. A quick dip of your head is sufficient. Do it whenever you would say "thank you"
- Receive things with both of your hands: if someone hands something to you, try to use both of your hands to receive it instead of just one hand
- Learn a few basic Japanese greetings/phrases. “KON-ni-chi-wa” and “o-ha-YO” means “hello” and informal/friendly “good morning”. “su-mi-ma-SEN” means “excuse me”. “EH-goh-shia-be-leh-ma-su-ka?” means “do you speak English?”. And of course “a-lih-ga-TOU” means “thanks”.
- Do not cross the road when the pedestrian light is red, even if there’s no car. In North America and most parts of Europe and Asia, the pedestrian light is pretty much optional if there’s no car. But in Japan you will be regarded as a barbaric foreigner if you do this