Every syllable in the Thai language is pronounced using one of 5 different tones: High, Mid, Low, Falling, or Rising. The choice of which tone to use is based on the consonant class of the initial consonant of the syllable, along with the tone mark, if any. If the tone mark is absent, then the decision is made based on whether the syllable has a live or dead ending. And in the special case of a low class initial consonant with a dead ending and no tone mark, the vowel length then comes into the equation as well.
You can determine whether a syllable has a live or dead ending based on the final sound of the syllable. If a syllable ends with a K-Stop, P-Stop, or T-Stop, or it ends with a short vowel (with a few exceptions), then the syllable is considered Dead. The pronunciation of a Dead syllable is also distinctive in that it ends abruptly in a glottal stop in a way that is not normally found in English. Exceptions to the short vowel rule are เ◌า, and any vowel that ends with a 'Y' sound.
Every other type of ending produces a Live syllable. This includes M, N, Ng, all long vowels, the vowel เ◌า, and any vowel that ends with a 'Y' sound including ไ◌ and ใ◌.
The chart below is a summary of the Thai tone rules. For purposes of this chart, LV means the syllable has a long vowel, and SV means the syllable has a short vowel.