Q: What is HDR?
A: HDR is a technique that allows a greater dynamic range of luminances between light and dark areas of a scene than normal digital imaging techniques.
The intention of HDR is to accurately represent the wide range of intensity levels found in real scenes ranging from direct sunlight to shadows. They are composed from 1 to infinite number of images depending on the control required. Typically photographers use 3,5,7,9.. exposures since they expose for 0EV, then +1, -1.. which balances the tonal range.
Q: How do I make HDR's the D40? (Bracketing?)
A: HDR is done by taking multiple exposures with the camera on a tripod and using software (Photoshop, Photomatrix) to merge them together.
On other cameras there is a mode called bracketing. by going into this mode and selecting the EV range the camera will expose and take all of these photos automatically (no settings change just hit the shutter).The D40 does not have an autoexposure bracketing function. But, bracketing for HDR can be done manually, with a tripod.
To perform exposure bracketing, mount the camera on a tripod, set your aperture, and take multiple exposures, varying the shutter speed. (You can do the same thing shooting in aperture priority and changing exposure compensation, but this requires holding down the +/- button, rather than just turning the command dial.)
Typically, HDR is done in full stops (Ex. -3,-2,-1,0,+1,+2,+3 for a 7 exposure HDR). Full stops makes the exposure calculations easier and provides a noticeably different exposure but keep the range close. You will also have to work with less photos.
Once you have the images there is several software packages which merge all of these photos into an HDR. The easiest is Adobe's Photoshop and Photomatrix. There are numerous tutorials online for how to do them.