Pay attention to the opening and closing of your mouth. Take a word like melting, for instance. The morphemes, which are the units of meaning in the word, are definitely 'melt' and 'ing'. However, when you pronounce the word, the mouth starts off closed with the 'm', opens for the vowel 'e', and closes with the 'l', before opening again in the second syllable. This opening and closing of the mouth is what creates and defines syllables in spoken English; when your mouth closes, the syllable ends.
While there can be two or three consonants at the end of a syllable, we often find that when there are two consonants next to each other between vowels, the first consonant will close the first syllable, and the division will be between the consonants. Since consonants are sounds that are blocked by the lips, tongue, or teeth, the mouth is closed in some way or another by a consonant sound.