A question mark replaces a period at the end of a sentence when the sentence is a question.
Question words like who, when, where, why, what, which, and how indicate that a sentence is a question. If your sentence begins with one of those words, then it is most likely a question and should be ended with a question mark.
- Who's sitting on the bench?
- Where did I put my keys?