Is the letter Y a vowel or a consonant?
The letter Y can be regarded as both a vowel and a consonant. In terms of sound, a vowel is 'a speech sound which is produced by comparatively open configuration of the vocal tract, with vibration of the vocal cords but without audible friction...', while a consonant is 'a basic speech sound in which the breath is at least partly obstructed'.
The letter Y can be used to represent different sounds in different words, and can therefore fit either definition. In myth or hymn it's clearly a vowel, and also in words such as my, where it stands for a diphthong (a combination of two vowel sounds). On the other hand, in a word like beyond there is an obstacle to the breath which can be heard between two vowels, and the same sound begins words like young and yes. (This consonant sound, like that of the letter W, is sometimes called a 'semivowel' because it is made in a similar way to a vowel, but functions in contrast to vowels when used in words.) Whether the letter Y is a vowel or a consonant is therefore rather an arbitrary decision. The letter is probably more often used as a vowel, but in this role it's often interchangeable with the letter I. However, the consonant sound is not consistently represented in English spelling by any other letter, and perhaps for this reason Y tends traditionally to be counted among the consonants.
You may also be interested in: Why is 'w' pronounced 'double u' rather than 'double v'?
Or take a look at: Are there any words in the English language that have all the five vowels with no intevening consonants?