Pages 104 and 105 of the Canon EOS 50D Instruction Manual (click to download the PDF) describes how to prep the camera for shooting BULB exposures.
Three main steps are involved:
- Set the Mode Dial to M.
- Set the shutter speed to "buLb".
- Set the desired aperture and shoot.
This is a screen capture of Page 104:

Page 105 touches on the use of the Remote Switch RS-80N3 or Time Remote Controller TC-80N3, or any other EOS accessory equipped with an N3-type terminal (see Remote Shutter Release / Trigger Options for Mid to High End Canon Digital SLR Cameras for examples) for shooting BULB photos.