They are usually an additional piece of equipment that locks onto or into your main CPAP machine (such as in the picture, right, demonstrating the Respironics System One arrangement), but some CPAP machines come with a humidifier built in. Most machines will have their own specific humidifier available.
Not sure if you require a humidifier? For most machine they can be purchased and integrated separately, so you can just order your machine without and see how you go. If you do find the air to be uncomfortably cold, or are suffering from dryness in the mouth or nose, then you can order the humidifier separately. However if you do already wake with a dry mouth, then CPAP is only likely to exacerbate that and so we would recommend purchasing one immediately. For those unsure, just see how you get on without before committing.
If you know you need a humidifier, then it could be worth considering a machine with a humidifier built-in. An example of this is the Fisher and Paykel ICON (shown left). These add greater convenience and are often more compact than having two separate units (one machine, one humidifier) so save space on your bedside table. However, these are not recommended for those who will be travelling with their CPAP machine.