The mechanics of say a consonant and vowel are completely different. When saying consonants you must completely close your vocal tract. The opposite is true when you are saying a vowel aloud. In the English alphabet there are 21 letters that represent consonants that produce 24 different consonant sounds. Consonants produce a great deal of friction to be said aloud.
The letter "Y" is often a big old question mark when classifying it as a consonant or vowel. In the word "happy", the letter "y" acts as a vowel.