Not too many options with this. Make sure the contacts between lens and camera body are clean. Use a pencil eraser to clean them, but be careful. Does the camera's menu system have an autofocus override that needs to be turned off? Is the lens fully mounted on the body? Remove it and reattach it to make sure it's locked in. Did the focus point that's doing the focusing (seen through your viewfinder) get moved to one of the peripheral points and the camera is constantly trying to focus on something other than your subject? If so, move it back to the middle point and see if that solves the problem. Maybe it's the lens? Try another lens to see if the problem persists. Borrow from a friend if you don't have a second lens or go to the camera shop that sold you the camera. I shoot with Canon equipment, so am limited in what I can offer, but the above will help you narrow down the source of the problem.
Gary