Short Focal Length
It also helps to have a close subject and a distant background. The short answer: Unfortunately, you cant. As Charles said, this is a function of aperture size. What he failed to mention is that its also a function of "focal length", a fancy term for zoom.
Most compact digital cameras use very small sensors, including the PowerShot S5 IS, and by virtue they need extremely short focal lengths, and therefore offer extremely broad depth of field. Im sure youve noticed that in your own experience. There is one workaround: Set your camera to "macro" mode and zoom in until the subject is in focus. 16x lens is a pretty hefty piece of glass. 40x short focal length lens as no big deal. As with all telescopes, the most important factor for good viewing is aperture, or the diameter of the objective lens or mirror. If youre on a budget, that usually means getting a reflector, which is cheaper for the same aperture than a refractor. Planets are also small, so you will need high magnification for the best views. If you wear glasses, short eyepieces can be troublesome because you may need to get your eye closer to the eyepiece than your glasses allow. High magnification also means small fields of view, so you will need a good telescope mounting to follow the planets across the sky.
They pack a long focal length in a short tube, and are not too expensive. Both Celestron and Meade make a number of models. Having to start somewhere, I am going to assume that you own a digital slr already and that you know how to take pictures with it. Your task then becomes the following: 1. Couple the camera to a Telescope 2. Aim the Telescope at the object you want to photograph.
Keep the telescope aimed at the object with the precision necessary to produce a sharp image for the duration of the exposure. To accomplish the above, you need to become familiar enough with the night sky to find the objects you want to take a picture of. Very easy in the case of the Moon and most planets. Not easy at all in the case of most galaxies and Nebulae. You will also find that some facets of Photography are different from terrestrial photography. Getting the right exposure time is easy while focusing is one of the most difficult tasks of astro imaging. Exposures of several seconds are possible to image the star fields of the Milky way, for example. Images of star trails with exposure lengths going into hours is also fascinating.
With a telephoto lens you can take some very nice pictures of the whole Moon, since exposure times are short, no guiding is necessary. Once you get past this point however, some kind of a tracking mount is needed, along with a Telescope. Now comes an important decision point. In general terms, the bigger the telescope used for imaging, the better and more accurate the mount has to be. Remember, when you increase the magnification of an image, you also magnify any errors to the same extent. Many folks find it easier to start with a short focal length Telescope which requires less accuracy from the mount and upgrade their equipment as they gain experience. Starting with a big, long focal length Telescope and the mount to handle it is expensive and can be very frustrating, with a super steep learning curve.