Does the camera seem to focus when you are using the display as a viewfinder? Or is it obviously not in focus even before the photo is clicked?
If you hold your hand close to the camera in front of a more distant scene so there are several possible focus points, does the camera try to focus on anything or just no effort whatsoever?
Look closely at the lenses, make sure they are clean and clear. It would be embarrassing to go to a Genius Bar appointment to get the lens cleaned. On one occasion I even found a user with a brand new device had not removed the protective adhesive film from the lens. (I don't think Apple uses a packaging or protective film on the current products)
Final solution if you can't get it working - Contact Apple Support and arrange to get the camera checked.