There approximately 95,000 shrines and 86,000 temples in Japan. So, what is the difference between the two? The short answer is that shrines are for the Shinto religion and temples are for the Buddhist religion, though many Japanese people practice both. If you intend to visit temples and shrines, it is best to understand how to recognize which are which.
For starters, every Shinto shrine is marked with a torii gate. A torii gate is a large structure that you must walk under to enter the shrine. These gates have two large poles with two large pieces crossing the top. The gates are often a bright reddish-orange color of vermilion. The gates act as transport from this world to holy ground. Once you have passed through the torii gate, you are now within the deity’s domain. Therefore, before passing through the gate, it is proper to bow to show respect to the deity of that shrine. It is also considered inappropriate to walk through the center of the gate, as that is where the deity passes through.
Absolutely no temples have a torii gate. However, most are marked with a large wooden gate, many as tall as two stories high. A temple gate will often contain two statues of guardian gods, one on each side, which can be very terrifying to look at. As terrifying as they may be, these statues are intended to ward off evil spirits, not faithful visitors. Buddhist temples also often have a large pagoda structure and/or a large bell.
Another way of knowing whether a place is a shrine or temple is by the name. Most shrines use the suffix jingu, while most temples use the suffix ji.
If you see a temizuya, or basin of water in which you purify yourself before entering, that will not tell you whether it is a temple or shrine. Temizuyas are seen at both temples and shrines.
A unique feature of temples is the incense burners. If you can smell incense, you are likely at a temple. If so, be sure that you understand the proper praying ritual. In the Shinto religion, you are supposed to bow twice, clap twice, and bow once more when praying. This is very different from praying at a temple. At a temple, it is proper to place an incense stick or candle in the designated place. If you do not see incense or candles, you may see a bowl of powder. Take a pinch of the powder and sprinkle it upon the bowl of burning powder. Then, join your hands together and pray. It is very important that you do not clap.
One of the most obvious indications that you are at a temple is if you see a Buddha statue. Any visual representation of a deity means that you are in a temple. This is because the deities in the Shinto religion are never physically represented.
Overall, the difference between temples and shrines is very complex even to a Japanese person. For many, it does not matter which you pray at, as long as you pray. I believe it is a great experience for foreigners to visit a variety of each in order to better understand what makes them different.