Goshuin, or Shuin(the "go" is an honoriffic to show respect) are special stamps that you can receive from most Japnese temples and shrines. The name of the temple, diety, and the date you visited the temple are skillfully written in ink by a monk or priest of the temple. The calligraphy is beautiful. Then the page is stamped in vermillion red ink with the seal of the temple.
Traditionally, one would receive a stamp after copying a Buddhist sutra(shakyo) as proof of their study at the temple. These days anyone can purchase a stamp for about 300 yen. You should also purchase a goshuin-cho, or book, to collect your stamps.
Before receiving your stamp, it is common practice to pray in the temple. The goshuin are more than a souvenir, they are sacred, so take good care of yours!