Most likely the lens mechanism is jammed. This may happen because of dirt getting in - a few grains of sand will do it - or because the lens barrel got knocked.
[http://camerarepair.blogspot.it/2007/12/fixing-lens-error-on-digital-camera.html|Here's a general guide] for resolving this type of problem.
[http://www.theguardian.com/lifeandstyle/2014/sep/29/how-to-mend-a-compact-camera-with-a-stuck-lens|And here's another], written by someone who I believe is also a iFixit contributor ;)