A shrine is unlocked under the magical skill tree. Once constructed a shrine will allow you to enable an enchantment that will give you a power up for a short period of time. Things like faster movement, more XP from mining etc.
Once you select an enchantment it will last for a short period of time before it expires and there will be a 40 minute cooldown before you can select another enchantment again.
Is a shrine worth building?
Shrines are not really worth the effort to build. Early on in the game there are many better skills that you could be spending skill points on. The buffs that the shrine provides are often things that you can easily find elsewhere or are minor enough that they do not really provide a significant benefit to you to make them worth purchasing.