Lens is stuck
Fixing a Lens Error on a Digital Camera
This has to be THE most common failure mode for a digital camera. Some common error messages that might show up on the LCD's of cameras with this problem include "E18 lens error", or "lens error, restart camera". Some cameras might show nothing at all, but merely make a beeping noise as the lens goes out, then in, then the camera shuts off. Sometimes the lens won't even move.
Fix #1: Remove the batteries from the camera, wait a few minutes. Put a fresh set of batteries back in (preferably rechargeable NiMH 2500mah or better) and turn the camera on. If that didn't work, try pressing and holding the Function or OK button while turning the camera on.
Fix #2: Remove the batteries, then remove the memory card. Then install new batteries, and turn on the camera. If you get an Error E30, it means you don't have a memory card installed, so turn it off, slip in the memory card and turn it on one last time.
Fix #3: Insert the cameras Audio/Video (AV) cable, and turn the camera on. Inserting this cable ensures that the camera's LCD screen remains off during the start process. Thus extra battery power is available to the camera's lens motor during startup. This extra power can be useful in overcoming grit or sand particals that may be jamming the lens. If the AV cable doesn't fix the lens error by itself, consider keeping this cable installed while trying fixes 4, 5, and 7 as a means to provide extra help to these fixes. But note that I DON'T recommend keeping the cable installed during Fix 6 as you may damage the AV port while tapping the camera. Reinsert the cable only AFTER tapping the camera.
Fix #4: Place the camera flat on its back on a table, pointed at the ceiling. Press and hold the shutter button down, and at the same time press the power-on button. The idea is that the camera will try to autofocus while the lens is extending, hopefully seating the lens barrel guide pins in their slots.
Fix #5: Blow compressed air in the gaps around the lens barrels with the idea of blowing out any sand or grit that may be in there jamming the lens. Other variations include blowing with a hair dryer in "no heat" setting, or sucking the gaps with a vacuum (careful with this one).
Now we're entering into the realm of potentially damaging your camera in conducting the fix. There is definitely some risk here, so take care when conducting the following two fixes.
Fix #6: Repeatedly tap the padded/rubber usb cover on a hard surface with the intent of dislodging any particles that may be jamming the lens. Other variations include hitting a side of the camera against the palm of your hand. A lot of people have reported success with this method. HOWEVER, there is also some potential for damaging or dislodging internal components with this method, such as unseating ribbon cables, or cracking LCD screens.
Fix #7: Try forcing the lens. More people have reported success with this method than with any of the other methods. HOWEVER, there's obviously some potential for damaging your camera by using this method. Variations include gently pulling, rotating, and/or twisting the lens barrel while hitting the power button. Attempt to gently straighten or align the barrel if it's crooked or twisted. Another variation includes looking for uneven gaps around the lens barrel, and then pushing on the side of the lens barrel that has the largest gap (note pushing the lens barrel all the way in is NOT recommended as it may become stuck there). While doing any of the above, listen for a click that indicates that the lens barrel guide pins may have reseated in their guide slots. If you hear this click, immediately stop and try the camera.