Each output device, for example, your display or printer, is only capable of producing a certain range of colours. A colour space is a specific implementation of the colour model used to define the colour gamut (i.e., the range of available colour). For example, Adobe RGB, sRGB, etc, are all unique colour spaces for the RGB colour model. Different colour spaces are also available for CMYK and Lab colour models.
In order for a device to know which colour space to use, it looks at the assigned colour profile. You can choose your colour space by assigning a colour profile to your document.
Which colour space you choose depends on what you're doing and the colour model you're choosing to operate in.
If you're unsure of what colour space to operate, it's advisable to stick with the default sRGB IEC61966-2.1 profile if using the RGB colour model.