Assuming that your Canon DSLR is one of the models most commonly used for astrophotography - the 10D, 300D, 20D or the 350D - under manual control it should allow you to set exposures from 1/4000s (1/8000s for the Canon 20D) to 30s. The setting beyond the 30s is "bulb", a term left over from the days when a squeeze-bulb was used to mechanically activate camera shutters.
Modern DSLR shutters are triggered by closing a connection with a remote switch. The form this switch takes varies in complexity and price. The 300D and 350D models are budget versions of the 10D and 20D models. As such, there are a few variations in their design. One variation affects the remote connection port at the base of the camera. The 10D and 20D models present a proprietary N3 socket, while the 300D and 350D have a standard 2.5mm jack socket. This means that a remote switch suitable for one camera will not necessarily be suitable for another.
Remote switches available are the RS-80N3 (1OD and 20D) and the RS-6OE3 (3OOD and 350D). Connect the remote to the camera, set the camera to bulb, then press and hold the remote button to keep the shutter open. More sophisticated control is possible with the TC-80N3 (10D and 20D, or 300D and 350D if an adaptor cable is used) intervalometer. This can be programmed for a pre-exposure delay, exposure length, delay between exposures, and a number of exposures.
As well as using a remote switch, it is also possible to control the camera's shutter via a PC using suitable software. However, the USB cable link only permits exposures up to 30 seconds. To enable longer values, a special parallel cable needs to be used.