Out of focus actually just means that the focus is in the wrong place. Think of it as "the thing I wanted in focus is out of focus". It is the nature of lenses that SOMETHING is always in focus.
If you're having focusing problems, something will be sharp, it just won't be the right thing. The subject's ears are sharp but the eyes are soft, say.
Lighting generally won't affect sharpness.
Motion blur is often somewhat directional, everything will look as if it's "smeared" in a particular direction. Not always, but if all your photos are soft all over (so it's not a focusing problem) and some of them look a bit "smeared" you might just be having issues with holding the camera steady.
You can do some tests:
- set the camera down on something and use the self-timer. If these photos are suddenly much sharper, you're probably moving the thing around too much when shooting.
- take some pictures in full sunlight. With tons of light around, you or the camera will select a shutter speed plenty fast enough to "freeze" any motion, including your hands shaking the camera. Again, if these photographs are suddenly Much Sharper, you might have a problem holding the camera still.
- Try taking pictures at various apertures, by setting the camera down and using the self timer to remove "shaking" as a source of blurriness. Some of the pictures are going to be sharper than others. Now
you have some notion of which apertures your lens is sharpest at! (Note: ALL lenses are softer at some apertures, and sharper at others).
If none of the above makes your photographs come out any sharper, you may have a damaged piece of equipment, or possibly your camera simply isn't very good. Or, it's also possible that you're doing something to the images after they're taken. Maybe you're uploading them to a web site that ruins them, or you're doing something in Photoshop or whatever that ruins them.