It could be one of two things. Either the focusing motor went out, not allowing the lenses to move properly throughout the entire focus range. Or you simply have the phone too close to your subject for it to focus (all camera lenses have a minimum focusing distance).
If this is a new problem and you use to be able to focus at the distances you're shooting at, then I would suspect it's the camera module going bad.