They both contain vowels and consonants. So why should 1 be called consonant and the other vowel?
You'll understand if you just look at them romanized:
Vowel-stem verbs (一段動詞)
食べない tabe-nai 食べます tabe-masu 食べる tabe-ru 食べれば tabe-reba 食べよう tabe-yoo
The stem is tabe-, which ends with /e/, a vowel.
Consonant-stem verbs (五段動詞)
泳がない oyog-anai 泳ぎます oyog-imasu 泳ぐ oyog-u 泳げば oyog-eba 泳ごう oyog-oo
The stem is oyog-, which ends with /g/, a consonant.
Simple as that.
When learning Japanese as a foreign language, "consonant-stem" (respectively "vowel-stem") verbs are called thus, because their stem ends in a consonant (resp. vowel), where "stem" refers to the part not changing during inflection (conjugation).
mi-ru, mi-tai, mi-masu, mi-nai, mi-r-eba, mi-y-ou...
kik-u, kik-i-tai, kik-i-masu, kik-a-nai, kik-eba, kik-ou...
Depending on the inflection, consonant-stem verbs change the vowel coming after the consonant in the stem. In fact, all five vowels appear, which is why in traditional Japanese grammar (where the concepts "consonant" and "vowel" aren't used) they are said to follow 五段活用 "five rank conjugation". The vowel in the vowel-stem verbs doesn't change, so they follow 一段活用 "single rank conjugation".
Note that the dichotomy consonant-stem–vowel-stem is a simplification of traditional Japanese grammar, which further divides the ("vowel-stem") "single rank conjugation" into "upper" and "lower" (and also ignores the verbs suru and kuru). (Have a look at the table on Wikipedia.)