'caraid' is the noun. There are various gramatical instances where you lenite the first letter of a word. So 'c' becomes 'ch'.
The vocative case: a charaid (when you are addressing a friend)
The Genitive case: càr a charaid (the car of a friend / a friend's car)
There are lots of times when lenition happens so this is the harder part to learn.
Because they're different designators.
'a' (in English) is a non-rigid designator, whereas 'the' is a rigid designator.
So, in Gaelic, given there is no indefinite article, designation is non-rigid unless otherwise specified. Using a definite article where none should be changes the designation so changes the meaning fo the sentence.
It shouldn't accept charaid here, as far as I can see. It might just be letting you off with a typo.
Caraid is a noun, that means friend.
Charaid, is the same noun having been 'lenited' (the first sound of the word is aspirated). This tells us what grammatical role the word is playing (it is a noun of a particular gender in a particular case, it is in the vocative case, etc).