嗎 is a grammar particle used to form questions.
statement + 嗎
To ask a yes-no question, simply put 嗎 at the end of a statement. For example, take the following statement: 你 喜歡 喝 咖啡 。 which means "You like to drink coffee." Now, add 嗎 to the end of it: 你 喜歡 喝 咖啡 嗎 ? which means "Do you like to drink coffee?" Note that when turning the statement into a question, the only difference is 嗎. There are no other changes to the words or their order.
statement + tag + 嗎
A tag question is used when you want confirmation of something you said. You simply add question tags after statements that you aren't sure about. Some common question tags are: 對嗎 , 好嗎 , 行嗎 , and 是嗎 .