On here we often see headings like:
How to make an apple pie
offered as a question, which it isn't, it is a statement/title offering the reader instruction in how to make an apple pie. Sometimes a question mark will be stuck on the end as if that makes it a question, it doesn't, it is then just poor use of English and inappropriate use of the question mark.
It becomes a question if it is worded along the lines of, How do I make an apple pie? What is your recipe for making an apple pie?