+/- and Diaphragm (*) Button
This button is next to the shutter button.
In manual exposure mode, hold this and turn the rear dial to change the aperture.
In every other mode, hold it and turn the rear dial to change the exposure compensation (brightness).
This exposure compensation button is very important. You'll probably wear the paint off this one. This button makes the photos lighter or darker. + is lighter, and - is darker.
This only affects photos as you take them. Use whatever setting looks best to you; there is no correct setting.
A flaw in the D40's meter firmware (same issue as the D80) makes most photos too light, so I leave mine set to -0.7. If your photo is too light, hold the +/- button and spin the rear dial to a more negative number, like -1.3. If your photo is too dark, hold it and spin the dial to a more positive number, like -0.3 or 0.0. It's perfectly OK to go to any number you need, like -3.3 or +1.0.
This error isn't a simple calibration issue. The D40 does different weird things with different subjects and different compositions. The D40's meter firmware is designed erroneously to expose for the darkest part of the image, so it's almost impossible to get the right exposure of someone wearing black, especially as they move around the image. You may need -2.0 or -3.0 compensation, while other shots of light objects may be fine with 0.0.
The need for constant variation and supervision is what makes this meter so bad. I prefer my D200, which rarely requires any correction.
Flash exposure is Nikon's usual perfection. You can change it's brightness along with the flash button.
HINT: You can see the + or minus value displayed in the finder as well as the rear LCD, so you can adjust this without taking your eye from the finder. The finder display only reads the value when the button is pressed, otherwise those digits read exposures remaining.