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
- Using the Lens is an effective way to "cheat" at the Hyrule treasure chest game.