It's all to do with the vocal cords. If they are vibrating and there is no restriction on the flow of air through your mouth, that is a vowel; for example /aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ (that's a very long one; the length of a vowel sound is restricted only by the capacity of your lungs - when an Argentinian football commentator says someone's scored a goal, the vowel sound can last as much as a minute.) English vowel sounds are usually shorter, though if you hear a Sergeant Major giving orders to soldiers on parade you'll hear vowel sounds lasting several seconds.
When the air flowing through the mouth is restricted or blocked, you get a consonant; there are many sorts of consonant, but most of them come in two forms - voiced and unvoiced. Again, the vocal cords make the difference; put your finger on your voice-box (the larynx or Adam's apple) as you're saying /ssssszzzzzzssssss/. You'll feel the voicing (vibrations) switching off and on (off for the /ssss/ and on for the /zzzz/).