Every so often, we all end up with a blurry photo. There are four primary causes for blurry photographs; and the remedy for each one is different. So you need to figure out why you have a blurry photo before you can fix it.
One of the most common reasons for blur is camera shake - which is the inability to hold the camera steady. Depending on your camera's capability, there are several remedies available to you. First, you must hold your camera properly. This is easy with a DSLR or camera with an optical or electroinc viewfinder. You simply need to tuck your elbows against your body to minimize any movement of your arms. Then concentrate on standing still. Finally, inhale a good breath and hold it while you take the photo. When done properly, you can obtain blur free photos down to 1/30th of a second (shutter speed) or less. One characteristic of camera shake is when the entire photo is blurry.
First - stand correctly. You can either square your shoulders as shown here, or use a "Weaver" stance (shifting your left shoulder forward); whichever feels more natural to you. If you are left-eye dominant, you will probably use the Weaver stance; or right-eye dominant, you will likely square your shoulders off. Above all, you want to be comfortable.
Tuck your shoulders in, elbows against your chest, support the camera with your left hand, and the lens with your right hand, and hold your body rigid. Also, hold the camera up to your cheek or forehead. This is perhaps easier if you are left-eye dominant, but you should be able to do this with either eye. The combination of supporting your forearms with your body, and resting the camera on your face, results in a fairly stable platform.
Finally, learn to hold your breath when taking the photo. Proper breathing techniques will help hold the camera steady. Exhale, then inhale about 25~50% of your lung capacity and hold your breath - then take the photo.
A final tip... especially if you are using slow shutter speeds - if you can find a wall, building, etc. to lean against (either your side or back), use that in conjunction with this technique, and you will find you can hold the camera that much more steady.
When using a compact camera, practice a similar technique. Hold the camera as close to your eyes you can, which will help you lock your arms and elbows into your chest.
Even with a tablet, the same techniques apply...
Even with correct holding techniques, there comes a point where the shutter speed becomes so slow that you cannot hold the camera still. In these situations, look for a post, table top, or other support to rest your camera on. Or, use a tripod.
Optical Stabilization (also called Vibration Reduction, Image Stabilization, etc) is a feature in many cameras that can help in stabilizing the camera. This feature will usually help in blur caused by camera shake, but it will not correct any blur due to moving objects in your scene.
If you use stabilization, consult your camera/lens manufacturer's instructions as they differ from camera manufacturer and model. And, if you are using a tripod or any solid surfact to support the camera, turn stabilization off as it can actually be worse (as the anti-vibration motion can be coupled back into the camera).
When to use a tripod? This varies according to optical stabilization and lens focal length, but this is a rough estimation of when to give up and use a tripod:
If the shutter speed on your camera is below this range, a tripod (or resting the camera on a post) is recommended. Note that vibration reduction becomes less effective as the shutter speed increases.
If you have a compact camera, you may need to multiply the focal length by 6. For instance, if you are using a 18mm focal length on a compact camera, you should use the same settings as a 100mm lens from the above chart (18mm x 6 = 108mm).
What if you cannot set your shutter speed? Many compact cameras, as well as tablets and cell phones do not have adjustable (or even indicate the current) shutter speeds, so how do you know when it is too slow for holding the camera? You will have to guess. The lower the lighting in the scene, the longer the shutter will typically stay open, and the more of a chance of shutter blur due to camera shake. In all but the brightest (outdoor) situations, you will likely have too low of a shutter speed to properly hand-hold the camera - unless a flash is used.
Notwithstanding the intentional motion blur to give the illusion of motion, unwanted motion blur is a second reason for a blurry photo. If you can visualize the shutter opening and closing, any movement of any object within your scene can result in blur. This becomes more pronounced as the shutter speed is slower (low lighting conditions for instance). The telltale when the shutter speed is too slow is when the scene is generally in focus except for the object in motion.
The remedy for blurred objects due to motion blur is to maintain a sufficiently high shutter speed. This is independant of focal length, and you may often need to use 1/125 second or higher to capture blur-free photos. However, realize that there is an artistic affect to blurry photos (called "dragging the shutter") as the photo to the left, even though blurred, does express the illusion of motion.