Flash is a great tool with which to control backgrounds especially when photographing small subjects. If that light from a flash falls off quickly, the distance it travels is short. Therefore, backgrounds tend to go black. Mounting a flash on a hot-shoe puts it very close to the subject. This dictates the use of small apertures. Without going into detail, the inverse square law of how light travels will produce backgrounds with little illumination.
Subjects set against dark backgrounds pop, creating images that have impact. Brightly colored subjects tend to work best with this method. Dark subjects blend in, necessitating the use of an additional flash to outline them by placing a halo of light around the perimeter. By taking the flash off the camera and placing it at an angle to the subject, creative lighting effects can be achieved, while at the same time maintaining a black background.
Should you decide you want the background detail shown, place the camera in slow-synch mode so the background image can build on the sensor during the time at which the shutter stays open. So rather than set the camera to the normal synch speed of 1/250, set it to 1/30 allowing 3 additional stops of ambient light to be recorded. This being said, the ambient light conditions may be too bright and create overexposure, but if you have the aperture set to f/22, which in turn is what causes the flash to fall off netting the black background, you should be safe shooting at 1/30. Try it—it’s digital!