After having celebrated at a Buddhist temple everyone heads to a Shinto shrine to pay their first respects of the year. This may happen right after midnight, as shrines are open with food stalls and ready to sell good luck charms. If you go during the day you will definitely spot people dressed in kimono amongst the thousands of people (sometimes even a million!) queueing to pray for the shrine. Many people will be dressed in kimono as a formal gesture to the shrine or temple.
The origin of Hatsumode
The first shrine visits on New Year's date back to the Heian period (794 - 1185) when the head of the household would pray at the family's shrine in a secluded room. During New Year's a god is supposed to visit each and every one of his/her shrines to give blessings. People wanted to lessen the burden on the gods by going out and visiting the shrine. During the Edo period (1603 - 1868), praying on New Year's changed from a secluded room to a public shrine. People would pray at the shrine nearest to that year's eho(恵方), or "lucky direction". You can find your nearest shrine on this useful eho map. You have roughly until the 7th of January to visit a shrine.
Hatsumode was a way to celebrate going from the cold winter to the milder temperatures of spring. The coming of cherry blossoms and growing plants signals a new beginning. When Japan entered the Meiji era (1868) the Japanese government decided to have a standardized calendar instead of the ever-changing Japanese lunar calendar (1873). This made New Year's day fall in the middle of winter instead of the beginning of Spring.
Charms and Prayers
Besides paying respect, people buy charms and bring their old ones so the temple can burn them. It is unlucky to throw away a charm as a god is believed to reside in it. You can bring any charm you don't want anymore to a temple and they will professionally take care of it for you.
Buy a mikuji(fortune telling paper) from the Miko(Shinto priestess) and see if this year will be a good one. At big shrines they usually have English mikuji for foreigners, so don't worry if you can't read Japanese. If you have a paper with bad luck you tie it to a branch near the shrine, preferably a pine tree. The words for "pine" (松 matsu) and "wait"(待つ matsu) sound similar. Your bad luck will wait by the tree instead of staying with you.
According to an old belief, you should not make a detour when returning home from the shrine. In order not to "spill" any of the good luck, you need to take the shortest way back. If someone died in your family last year you are advised not to visit a shrine either, as "death" is seen as impure. Each shrine and temple has a different view of death, so some shrines might have no problem with this.
Where to visit?
For the best luck, it's good to follow your eho and visit the nearest shrine. After all, this god is closest to your home and can thus provide the best protection. If you want to visit a popular shrine, Rakuten Travel has made a list of the best shrines to visit for 2017 (Japanese only). Here is their top 10:
1) Imado Jinja - Asakusa, Tokyo (luck, wealth, love and finding a good partner)
2) Shinsoji Temple - Narita, Chiba (traffic safety, business related wealth, safety)
3) Atsuta Shrine - Nagoya, Aichi (safety for your home/family, business prosperity)
4) Nikko Toshogu Shrine - Nikko, Tochigi (longevity, safety for your home, realization of one's earnest wish)
5) Samukawa Shrine - Samukawa, Kanagawa (traffic safety, protection from all directions, warding off evil)
6) Sensoji Temple - Asakusa, Tokyo (business prosperity, safety for your home, academic performance)
7) Ise Grand Shrine - Ise, Mie (safety for your home, easy childbirth)
8) Izumo Taisha - Izumo, Shimane (marriage, safety for your home, good luck)
9) Fushimi Inari Taisha - Kyoto, Kyoto (prosperous business, good harvest)
10) Dazaifu Tenmangu Shrine - Dazaifu, Fukuoka (academics, passing an exam, finding employment)
If you're still unsure of where to go, you can check out this shrine guide for Hatsumode (Japanese only).