The stars, planets and nebulae, well, all the objects in the sky (except for the Moon) are very faint, and you therefore need to record as much of their light as possible. The amount of light that enters the camera is controlled by two things: the shutter speed and the aperture.
Shutter speeds can go from a few miliseconds to several seconds. My camera has an upper limit of 30 seconds, but it also has a “bulb” setting that keeps the shutter open for as long as I hold down the shutter release. A shutter speed of two minutes allows the camera to collect twice as much light as a shutter speed of one minute. It is tempting to conclude that the longer the shutter speed is, the better.
But the shutter speed also affects the way movement appears. Very short shutter speeds can capture fastmoving objects, while normal or longer shutter speeds will just make them blurry. Although the stars at a quick glance might seem fixed, they are actually moving across the sky. Or, to be more correct: the Earth is spinning, which makes it look like the stars are moving. Fortunately, they do not move unreasonably fast for wide field photos, and it is possible to take sharp photos with shutter speeds of up to 30 seconds.
The aperture is a variable-sized hole in the camera lens. The larger the hole, the more light can enter. That is pretty straightforward.
Describing the size of the aperture is a bit more tricky. For this you use the f-stop, which runs in a confusing series of numbers: f/1, f/1.4, f/2, f2.8, f/4, f/5.6, f/8 and so on. The smaller the number the larger the hole, for example f/4 is a bigger hole than f/8. Going from one f-stop to its neighbor in the series corresponds to either doubling or halving the area of the hole and thereby also the amount of incoming light.
The f-stop is defined as the focal length divided by the diameter of the aperture. Since the area of the aperture is proportional to the diameter squared, a doubling of the area corresponds to a multiplication of the diameter with the square root of two. Look at the f-stop series again, see how each number is larger than the previous by a factor of the square root of two? It actually does make sense. :)
The size of the aperture also affects the depth of field, but for widefield photos of the stars this is not something to worry about. Therefore it is safe to say that the larger aperture the better.
The exposure is measured in units of exposure value (EV), usually referred to as stops, which represents halving or doubling the exposure. Multiple combinations of shutter speed and aperture can give the same exposure, for example 2 seconds with f/4 gives the same exposure as 1 second with f/2.8. Halving the shutter speed doubles the exposure (1 EV more), while going from f/2.8 to f/2 halves the exposure (1 EV less).
To determine if the exposure is correct, take a test exposure and examine the histogram on the LCD screen. It displays how many pixels in an image are at a particular brightness. The darkest pixels are on the left side, and the brightest pixels are on the right side. The darkish sky background is represented by the large peak. It should be about 1/4 of the way from the left side of the histogram. This is simply because the noise lies at the left side, and you do not want the image to be lost in it.