Photochromic lenses have an adjustable tint that changes with the amount of available light. In bright sunlight, they darken; indoors, they become clearer.
The most popular photochromic lens brand right now is Transition, but there are others such as acclimates, Sensity and Suntech, to name but a few. All these darken when exposed to UV light.
An alternative to photochromic lenses would be a separate pair of specs and prescription sunglasses, a lot of people who go for this option do so because they don’t like the photochromics.