A consonant was a specific sound made in verbal communication, as opposed to a vowel.
The preservers obelisk on Amerind could be opened either by playing certain musical notes or by speaking a series of vowels and consonants in their proper sequence. (TOS: "The Paradise Syndrome")
A reversal of consonant and vowel was called metathesis, which made Captain Picard call an USS Enterprise-D crew member Mister "Broccoli" instead of "Barclay". (TNG: "Hollow Pursuits")