Most cameras have a night setting mode, which usually involves using a flash. However if you interested in taking long exposure photographs, a flash will not work. You need to set your camera to manual mode, and grab a tri-pod (to prevent camera shake) Now, the longer the shutter speed, the more light that will be let into your camera. For example if you are out in the middle of nowhere, taking a picture of the stars, you would want to leave your shutter open for as little as a minute, or as long as the entire night. If you are trying to capture the movement of cars in the city, you won't need that long of a shutter speed, 1/15 will work just fine.
Keep your ISO at as low a setting as you can, which is usually 200. The best time to shoot at night is as dusk or close to dawn before the sky is completely black.