Rank: Wiz
Rating: 81%, 32 votes
A bit more detail would be helpful to diagnose your specific problem: what mode is the camera in, does it do it all the time or only in certain situations.
There are a few situations when the autofocus does not do well: focus too close to the subject, or in a very low light situation, or the subject is gray. Check that you are not affected by any of these.
Otherwise, try to find if there is something wrong with your camera: find someone else with the same camera (or one in a store display), and see if following the same steps gives you the same result.