Knowing the customs of a country before you visit it is very important. Some people manage to get away with travelling without any knowledge of where they are going or how to behave. Some of these people do no harm, but sometimes it can cause great offense and if you offend your host it could ruin your trip to Japan. Take the time to research your destination and the customs so that you act accordingly and respectfully. Japan is a country built on traditions and customs and if you embrace these customs then you are more likely to get to see the real Japan, get to know the locals better and have a more enjoyable experience in general.
The first thing to remember is that there is no tipping in Japan. No matter what the situation might be, or the area that you are staying in there is no need to leave a tip. The Japanese believe that everything should be included in the initial price, so anything extra can sometimes be considered to be an insult.
Bowing to someone is a sign of respect, much like a nod of the head has become a salutation in western societies. The depth and speed of the bow depends on the level of authority of the other person. A friend would receive a quick nod, whereas a teacher or person in high management would receive a slow, low bow. It is also important to add ‘san' to the end of the person's name as a mark of respect.
It is worth taking the time to learn how to use chopsticks. This will familiarise you with the locals and it will also possibly save you money, as you will become fuller more quickly, eating small amounts using the chopsticks.
The Japanese are much more particular about footwear in the home than many western people. Shoes must be taken off before entering the home and often you will be given a pair of slippers to wear inside. There will be a separate pair to use in the bathroom.
There are, of course, many other customs and traditions depending on what you are doing and who you are with, and these should be researched to ensure you are comfortable in your environment. But these few aspects cover the basics of Japanese customs.