You taking two (or more) pictures.
For example sun sets behind the buildings.
To take the first picture you take mesurements from the bright part of the scene (sky), which makes the buildings really dark and without any details.
The second picture you taking with the measurements from the dark part of the scene (which makes buildings looks ok but the sky is over exposed).
Then you combine these two pictures, so both, dark and bright parts of the scene are visible (no under or over exposure).
Like in the night city landscape
here.
You are able to see roof tops, window lights, some clouds...
With just one picture (with measurements taken from the sky) you would be able to see clouds, but building lights will be over exposed (really bright and merging into one blurry ligth in some part of the picture).
In the end you get the effect which is close to what human eye can see.
At least I think that this is all about