A consonant is a sound in spoken language (or a letter of the alphabet denoting such a sound) that has no sounding voice (vocal sound) of its own, but must rely on a nearby vowel with which (con = Latin for "with") it can sound (sonant). Some consonants can function like vowels (in that they occasionally occupy the nucleus of the syllable), like Czech [r] in krk 'neck' or English [m] in (disyllabic) prism. The sounds [j] as in English yoke and [w] as in English woman are sometimes called semivowels, because although they function as consonants in some languages (e.g. English or Latin), phonetically they are vowel-like, or to be more exact, are very short realizations of [i] and [u] respectively.
Consonant letters in the Latin alphabet are BCDFGHJKLMNPQRSTVWXZ. The letter Y stands for a consonant in yoke but for a vowel in myth. Originally, Y was a vowel letter in Greek, representing [u] (later on, front rounded [y], and in Modern Greek, [i]), and it normally has the sound value [y] in German, in Finnish and other Scandinavian languages. The letter Y nicely shows how letters change their function. In Afrikaans, Y denotes the diphthong [EI], probably as a result of mixing lower case i and y. In Dutch, Y appears only in loanwords and is usually pronounced [i]. Italian, too, has Y only in very few loanwords.
Obviously, consonants and vowels are difficult to transcribe adequately with the alphabet we use in everyday life. Therefore, linguists have devised phonetic alphabets such as the IPA alphabet or the computer readable SAMPA script.
Consonants are distinguished mainly by voice, manner and place of articulations.
Approximants are sounds between consonants and vowels.
English consonants arranged according to these properties (horizontal - manner; vertical - place), with voiceless and voiced consonants given in the form [t]-[d], and rounded forms marked by an asterix:
For English speakers, [D] is as in this, [j] as in you, [N] as in song, and [T] as in thing. There are actually two sorts of [l], the normal one as in liquid and a velarized form as in all. [t] and [d] are usually alveolar in Germanic languages but dental e.g. in Slavic and Romance languages, and postalveolar in the affricates [tS] and [dZ].
Many languages also distinguish between aspirated and unaspirated stops, depending on whether there is a release of air after the noise. A stop can also release easily into a fricative, giving us what is called an affricate. Finally, voice refers to whether or not the vocal chords are moving, so we have both voiced and voiceless consonants.