Exposure Compensation.

Over-exposure – Image too light.

Duplicate the layer by dragging it to the New Layer icon, just to the left of the dustbin.

With the duplicate layer “active” (blue), change the Blend Mode to Multiply.  This will darken the image by the equivalent of approximately 2½ f-stops.

Adjust the Opacity of the layer until overexposed areas are corrected.  40% Opacity is approx equal to 1 f-stop.  This may make other areas now too dark.

Add a Layer Mask to the new layer.

Set the foreground colour to Black, make sure the Mask is active, and use a suitable size Brush to paint the dark areas back to their original densities.

Under-exposure – Image too dark

An almost identical technique is used, except that the Blend Mode is set to Screen.

Exposure Gradation – due to light from window or flash fall-off.

Create a new empty layer above your image layer.

Set its Blend Mode to Soft Light (also try Overlay which gives stronger effect)

On this basis, the layer can be filled with a suitable b/w gradient fill which will compensate for the varying exposure.

If one area of the image is correctly exposed with other area(s) underexposed, use a gradient of foreground 50% Grey (choose from standard Swatch Panel) and background White.

Select the gradient tool and run the gradient from the correctly exposed area to the underexposed (bottom to top in the example).  You can change the Opacity of the layer if the overall effect is too severe.

If you “maximize” the image and then zoom out, you can extend the gradient outside the image area should this be beneficial.

The Layers Panel should look similar to that on the right.