吗 is a interrogative, which can be omitted. It is same with 'yet' of English. Do you finished your work? Not yet. But it's better if it is used at the end of sentence. Also, we can say: 你知道怎么泡咖啡吧?(Do you know how to make coffee?)
what's going on? what's up? 发生什么事情了, It is instead by 怎么了? it's more simply.
As you know, How means '怎么'。