In Ocarina of Time, the Lens of Truth is obtained by beating the Dead Hand at the bottom of the well in Kakariko Village. It is optional but would make the Shadow Temple next to impossible without it.
In Majora's Mask, it can be found in a treasure chest in Snowhead.
It allows you to see:
- Fake Walls
- Floors (and lack thereof)
- Invisible People
- Invisible creatures
- Invisible Items
- The Lens of Truth can be used to "cheat" at the treasure chest mini-game in Hyrule Castle Town, letting Link see what's in the treasure chest before he opens it.