If you have an external flash (and this even applies to the onboard flash but that’s a lot weaker) for your DSLR try shooting with the camera in manual mode and let the flash light the scene for you.
Canon flash units use E-TTL to figure out what power to use, Nikon and other manufacturers use something similar. In the bad old days photographs had to figure out the right settings with a light meter but now the tiny computer in your flash does the job automatically. This means you have a lot more freedom with your camera.
Instead of shooting in Program or auto mode switch the dial to M and change the aperture to F8, and the speed of the shutter to match how wide your lens is (or faster if you’re hand holding, try 1/50th of a second to start). Try shooting an indoor scene with objects at various distances. Do the same in Program mode too. You’ll probably find that objects that are blurry in Program mode are in-focus in manual mode!
By shooting in manual mode you’ll have more control over the depth of field, that is the area of the scene that will be in focus. F4 means that only a narrow sliver of the scene will be in focus but F8 broadens that. This is why those family portraits you shot in Program mode had some blurry faces in the background!
Many lenses produce sharper and better looking images at a certain aperture setting. F8 is widely suggested as a good starting point but it depends on the lens in question.
Unfortunately changing the aperture means less light gets to the sensor but your flash will do a good job of compensating for that. It can’t cope with every aperture setting or scene so experiment and get to know your equipment.
On Canon cameras Manual mode is better than Aperture priority mode for simple flash photography. In Aperture priority mode the camera adjusts the shutter speed for the ambient light and doesn’t use the flash in this calculation. In a dim room this will result in a long exposure. The flash will illuminate the subject but the background will be exposed for too. This is of course a valid way of taking photos but you have to be prepared for some camera shake, or you can underexpose the image on purpose to reduce the shutter speed. Long exposure shots with a flash produce some great looking action shots too, but be sure to set the 2nd curtain sync correctly! Here’s a good comparision of 1st and 2nd curtain sync.
Here’s some good advice and tips on the subject for Canon EOS owners.
Lego characters shot at f/5.6
Lego characters shot at f/8
Lego characters shot at f/13
Lego characters shot at f/20
Lego characters shot at f/36
||Canon EOS 40D