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 metathesis, which made Captain Picard call a USS Enterprise-D crewmember Mister "Broccoli" instead of "Barclay". (TNG: "Hollow Pursuits")