This is a topic that even illustrious professional photographers find hard to handle and correct for. Dynamic range in a simple explanation can be expressed as the difference between the light and dark tones in the picture. So if you have a picture of a landscape, the amount of darkest dark color that you can see on one hand to the lightest of light colors on the other gives you the whole spectrum of dynamic range of the picture. As we know there is a whole band of colors that fall outside the visible spectrum and when these colors are unable to be picked up by the camera the frame appears unusually dark or white. When this happens, the dark appears too dark and the areas affected become underexposed. Conversely the highlights represented by white areas appear washed out.
Photographers use different methods to ensure that the pictures that they shoot have a reasonable dynamic range. Often the best method that they use is shooting three or more different images of the same frame exposing for the foreground, the background and the subject and then mixing them together using layers and masking methods in Photoshop to create a single high dynamic range (HDR) image. The images that they shoot are evidently RAW and they individually often don’t have the desired quality until they are mixed together to create the desired effect.
Simple methods such as additional lighting or using the built in flash becomes necessary when the live view histogram suggests that there is not really a decent dynamic range in the frame. In case there is no way to increase the amount of light, one can use the exposure compensation process or use a ND filter (discussed in details later).
Another tip to ensure a reasonably good dynamic range in the photographs (without using RAW or depending on post production to create HDR images) is to expose for the area that has comparatively a bit more light. Say if you have a challenging lighting condition shooting landscape. The mountains are dark and the sky is overexposed. You could try exposing for the sky by stopping down the exposure compensation. An extension of the same approach would be to use a neutral density filter. In this case a graduated neutral density filter would be more suitable. This will compensate for the brightness of the sky and thus make the information available from the shadow area more discernable.
Post production using specialized software is one of the preferred methods to salvage images which have been shot in RAW and lacked the right amount of dynamic range. Using these software one can recover to a large extent the highlights in the image and the information from the shadow areas.
The existence of a high dynamic range in the pictures is not always desirable though. This is true when you’re shooting black and white. Your pictures will have a lot more shades of gray and if you review the histogram the extreme left and right sides are bound to have more of the clustered skyscrapers. But it is a good thing and only means that you were able to shoot the picture the way you intended to in the first place.