I guess its okay to advise using off-camera flash etc for best results, but I suspect the original question was really about general guidelines when using on-camera flash pointed directly at the subject. There are many situations where this is about your only option, for example photo journalisam etc, and even family events with children where there might be little opportunity to set up off-camera flashes (and where trying to do so will just result in missing the moment).
The first and simplest option is just fit your flash into the hotshoe, switch your camera to program mode and fire away. Sometimes this might work fine, but there are a couple of things to watch out for. If the ambient light is low its likely your camera shutter speed will be low possibly resulting in blurred pictures or movement blur on the people in the pictures. In very bright ambient light you will get a small aperture which means the flash has to pump out a lot of power and you'll notice this with slow recycling times. In bright light you can work around this to some extent by setting your flash to high speed sync - although this will also reduce its range.
Personally I think the best option (although a little more thought is required) is to set your camera to manual and then choose a combination of settings to match the ambient light (in bright light, set ISO-100, shutter to max sync speed (200/sec for 5D) and what ever aperture you need - in low light you'll be looking at a high iso and wide aperture and a shutter speed high enough to prevent movement blur). Then take a picture of the background and make sure it looks as you wish (a little over or under exposed is fine, depending on how you want your end picture to look). Then fit the flash and set it to auto. Take another picture and see what you get. If the subject, lit by the flash, looks too bright then back off on the exposure compensation (on back of flashgun). If the subject is too dark do the opposite.
Now you can adjust the exposure on the subject by adjusting your flashgun, and adjust the exposure on the background by altering your camera settings, the aim normally being to get a nice balance between subject and background.
Hope that helps 