Encased relics spawn randomly underground.
When you dig one up, it triggers a relic minigame. In this minigame, you have a limited number of clicks to find the exact spot where the relic is hidden before the encased relic shatters.
Each time you click on the encased relic, you'll get a visual ping circle and a sound cue. A small circle with a soft sound means you're far from the relic, a medium ping and sound means you're getting closer, and a large ping with a loud sound means you're very close.
Collecting multiple relics will unlock permanent relic powers. You can view all the relics you've found and any powers you've unlocked in the Lorestone.