Lens errors are fairly common. Usually it's sand or grit interfering with the lens extension mechanism. Or the camera's been dropped with the lens extended. Or the camera has been powered on, but the lens had been blocked preventing its extension. Or the battery ran down with the lens extended ...

Unfortunately, many cameras that fall prey to this can only be corrected by professional repair. But, here are some things that you can do that may correct it. They only seem to work for less than 40% of the lens errors, but if the camera is out of warranty, they're worth a try.