Once you understand how the flash metering works, and what the difficult situations for the exposure system are, you will be able to anticipate problems and work around them. The Coolpix series meters the flash exposure by using a small sensor to the lower right of the lens. During the actual exposure, that sensor looks at the scene and decides when there has been enough light and when to cut off the flash. It is important to understand this averaging aspect, it is the cause of most of the exposure problems with the Coolpix cameras. This is called pseudo-TTL metering, because although it acts very similarly to checking the exposure through the lens, it is not really Through The Lens.
Some cameras use a pre-flash.
This is a short pop of the flash before the main exposure. The camera actually takes a picture during this time, and adjusts the amount of light for the main exposure correspondingly. This has the advantage of letting the camera see the actual scene for it's exposure making decision, and can result in a better exposure. The pre-flash technique has disadvantages too, and is usually found in more consumer oriented cameras. First, it takes time to pre-flash.