A question mark is, naturally, a mark which shows the sentence is a question. A question mark is required at the end of an interrogative sentence. Usually, interrogative sentences are identified by a question word (who, what, when, where, why, how), but sometimes we leave the question words out and just use tone to imply the question.
An interrogative sentence must be identified by a question mark, so the reader understands the writer’s intended meaning.
When do you need to have this finished?
Can you have this finished by tonight?
I need to have this finished by tonight?
Will you eat dinner with me?
How are we going to get all this stuff done?
Do not use a question mark at the end of an indirect question. A period should be used instead.
She wondered if it was going to rain soon.
Maggie asked about when they’d be coming to visit.