Take the lens off of your camera.
Put the lens in MF mode.
Twist the FOCUS ring (the tip of the lens) all the way to one side (extend it). You may hear a click noise or two, this is good, but don't FORCE the lens.
Twist the FOCUS ring all the way to the opposite side (retract it). Again, you may hear a couple of clicking noises. What we hope is happening is the focusing motor being put back into its proper place.
Put the lens back on the camera.
Put the lens in AF mode.
Turn the camera on.
Put the camera in AUTO or P mode.
Take a test photo.