Direct, on-camera flash creates harsh lighting,red-eyes and unflattering hard shadows. The article that gryphonslair99 referenced is a very good one, and it is worth reading through several times. However, a simple way to get started is to use the flash in bounce mode, by angling the head either up (bounce from the ceiling) or somewhere behind you (bounce from a white wall behind you). Bouncing the light spreads out the light a lot so your subject has to be relatively close to the camera. So, put your flash in the camera shoe, set the exposure program to "P", angle the flash head to light the wall behind you, focus on your subject and click. This will result in your camera computing the flash exposure, and exposing for the flash. The wall will be acting as a relatively broad reflector and will provide your subject with a comparatively soft and envelopping light.
If you want to also capture some of the ambient light, change to the Av setting on the exposure dial. Then the camera will expose for ambient light with flash fill exposure. This can work if the ambient light is relatively bright and your shutter speed is 1/30 sec. or more. If it is dark, then the camera will keep the shutter open until the meter decides that you've captured enough light - and this will result is rather blurry photographs. You have to experiment to get a feel for what works.
Once you've gotten some experience with flash (and hopefully some good results), then you can explore off-camera flash, manual exposures, radio triggers, multiple flashes, light modifiers like diffusers, reflectors and the like....