During my former activities as a guide in Japan, I was often asked this question. So I felt like I need to write a proper article about it! However, I have first a few things to say about it:
Prayer in a shinto shrine is done in two acts: purification and meditation.
At the entrance of all the shrines, you will find an ablution fountain, also called temizuya in Japanese. You must first take the ladle with your right hand and then fill it with water. Wash your left hand and then do the opposite. Then use your right hand to rinse your mouth with the water in the ladle (you must not drink the water). Then rinse your left hand and then rinse the ladle so that the ladle is clean for the next person.
2. The meditation
In front of the worship building, believers begin by bowing twice as a sign of respect for the kami. They then clap their hands twice and quietly meditate. Once their vows have been conveyed, the believers clap their hands one last time.
I described here the most common way of praying, but there are also some variations depending on the shrine you are in. For example, at the Izumo Taisha Shrine in Shimane Prefecture, believers clap their hands four times.
Feel free to tell me in the comments if you found this article useful, and feel free to let me know about the aspects of Japanese culture you would like to see read in this blog!