Shrines and temples are both important places of worship in Japan, but there are some key differences between them.
Shrines (神社, jinja) are dedicated to worshipping 神 kami, spirits or deities of nature, ancestors, and heroes. They are typically characterized by 鳥居 torii gates at the entrance, and the main buildings are often made of wood.
Temples (寺院, jiin) are dedicated to the practice of Buddhism, which originated in India. They are typically characterized by 塔 pagodas and statues of Buddha, and the main buildings may be made of wood or stone. Usually, you will see tombstones in the temples.