It depends on a couple of things, but basically there are a few scenarios. I'll explain first what they are, and then why you might choose one over the other.
Using the Flash as a primary light source
If flash is your primary light source, and you have ETTL (Or whatever Nikon's equivalent is), then what will happen is your flash will become your dominant light source, and the correct amount of flash will happen via the ETTL protocols.
Using the flash as a fill flash
If your image is already exposed properly, then your flash will simple give a taste of a flash so as to overcome the darker areas in the image. It's perfectly acceptable to use the flash in such a scenario, it will lead to a less contrasty image, and will probably look better with your friends, as there will be fewer shadows under the eyes and similar phenomena.
How to choose which mode
So, assuming you have ETTL, your image should be correctly exposed, so long as you aren't over exposed. The question then remains, what do you set your ISO, aperture, and shutter speed to? There are a few factors, so let me try and explain.
- If you have distant, weak background light that you want to keep exposed, and if shutter speed isn't much of an object (IE, the subject won't move, or there is enough light to minimize any movement that might exist), then you probably want to use your flash primarily as a fill flash. If your subject is much darker than the background, then just expose for the background and set your flash in ETTL mode, and it'll expose it correctly.
- Aperture is an artistic decision, as always. Flash is just another knob, but it won't really change anything.
- If you want to light your subject, but don't care much about the background, or your subject is close to the background, then I recommend that you set your Aperture and Shutter Speed so as to minimize camera shake and get the desired affect, and let the flash light the scene. Look at other posts to see how to use the flash to light the scene, but that's the general idea.
- If the scene is very underexposed, then the flash will cause the foreground object to be lit, but the background to appear black (Unless the background was brightly lit, or close to the subject and in the direction of the flash). The more underexposed, the more black the background will appear.
I usually set my camera to manual mode and intentionally underexpose when I'm indoors or outdoors at night, trying to underexpose by about 1-2 stops at most, unless it's a high light situation and I'm cranking up the ISO/Aperture to make sure I have enough light. I usually try to expose correctly when I'm outdoors, and just use the flash to fill in some shadows.
Hope this helps!