Cantonese is one of the languages spoken in China. It is not a dialect of the invented "Chinese language". It is a language itself, such as Mandarin. The only difference is that Mandarin is the official one, and Cantonese is not.

Luca: Hi, Zeke! what've you been up to?
Ezekiel: Oh, I've been studying a lot for my exam tomorrow
Luca: exam of what?
Ezekiel: Oops, I forgot to tell you that I took up Cantonese, which is a language spoken in China. It is not the official one, though.

A language spoken a lot in the south of China as well as around the world (especially in Chinese takeaways). It's roughly as related to Mandarin Chinese as English is to German: A speaker of (only) Cantonese cannot readily understand a speaker of (only) Mandarin Chinese and vice versa. Cantonese is spoken and not written, just as Mandarin Chinese is: Cantonese speakers and Mandarin Chinese speakers write in Written Chinese. It just happens that Mandarin Chinese is closer to the written standard.

If you're from the US or the UK, when you think you hear "Chinese", it's likely Cantonese, especially if your knowledge of "Chinese" is limited to "chicken chow mein".

Cantonese is actually a dialect and not a language, contrary to what the above poster said.
Although Cantonese and Mandarin may sound radically different, they are originally from different regions of China (not from different countries) and are unified by the Chinese writing system.

Some people may argue that Cantonese speakers (usually Hong Kong and Guangdong region people) and Mandarin (mainland China) even use different types of writing systems because Cantonese speakers usually write traditional characters while Mandarin speakers usually use simplified characters, but they are actually not considered separate writing systems.
Historically, there was one of very few dialects to begin with, and as people branched out to different regions of China (which is quite a huge country), each region started to slowly adopt it's own accents and speaking mannerisms, which resulted in a different dialect, but the writing system is still the same, hence they are speaking the same language.

Xiao Ming (Mandarin name): Hey what's your name?
Chak Tong (Cantonese name): I cannot understand a word you are saying...
Xiao Ming: OK, how about this? *pulls out sheet of paper and writes a brief introduction about himself*
Chak Tong: *writes on the sheet of paper "Oh, I understand what you are writing but not what you say. Nice to meet you."*