Here's David Hobby from Strobist.com's word on the process..
Controlling Your Light from the Camera
Assuming just one flash and ambient light, there are only three combinations with which to control the two variables.
1. To alter flash and ambient levels together:
Remember, flash cares about the aperture and ambient cares about both the aperture and the shutter speed. So to lighten or darken both at once, we adjust the aperture.
If, for instance, our whole scene (flash and ambient) is too dark at f/8, we could move to f/5.6. This would lighten everything by a stop -- flash and ambient alike. Conversely, we could darken the entire scene by going from f/8 to f/11.
2. To alter the ambient level but not the flash:
As we said, flash cares about aperture and ambient cares about both aperture and shutter. So to control the ambient only, we will adjust the shutter but leave the aperture as is. Assuming you are within your sync speed, this will alter only the ambient-lit portions of your photo, as in our coffee table camera shots.
3. To alter the flash-lit area but not the ambient:
This is the most complicated of the three, but only as much as "chocolate/vanilla twist" ice cream is more complicated than either of its components.
Flash cares about aperture, and ambient cares about both aperture and shutter speed. So to alter flash only, we are going to adjust the aperture (which alters both) and compensate for the ambient by adjusting the shutter the other way.
(Sound of 2,000 heads exploding.)
This is not hard at all. Say our ambient is fine, but our flash is not bright enough. Aperture is at f/8 and shutter is at 1/60th, for the sake of argument.
So we open the flash up to f/5.6, which brightens the flash-lit area -- and the ambient, too -- by one stop. Then we close down the shutter to 1/125th, which brings the ambient exposure back to its original exposure value. (1/125 @ f/5.6 = 1/60 @ f/8, right?)
Piece of cake.
To darken only the flash but preserve the ambient exposure component, we would close down the aperture and open the shutter speed by the equal amount.