吗 = 口 (mouth) + 马 (horse, for the sound). The mouth radical marks it as a spoken sound-word; toneless 'ma' is its whole job — a little question mark you say.
吗 is the magic word that turns any statement into a yes/no question. Just add it to the end: 你好 (you're well) → 你好吗? (Are you well?). 是 (it is) → 是吗? (Is that so?). 你是老师 → 你是老师吗? (Are you a teacher?). No word order changes, no rising 'do/does' — Chinese just tacks on 吗. One of the most powerful single characters for a beginner.
A mouth (口) sound you add at the end — turns a statement into a yes/no QUESTION.
吗 is the easiest grammar in Chinese: add it to ANY statement to ask yes/no. 他是中国人 → 他是中国人吗? No reordering, no 'do/does'. Just 吗.