This kind of clause is often called a "first conditional". You use this to talk about things that you think might happen in the future:
If you have any problems, call me.
If we don't finish on time, there will be hell to pay.
The result, which comes after the comma, can be all kinds of clauses, including commands, statements, and questions:
If I'm not awake by eight, wake me up.
If it's nice out tomorrow, Holly and I are going to go play a bit of tennis.
If we have a girl instead of a boy, will you be disappointed?
And, of course, you can also reverse the order of the "If" part and the "result" part of the sentence:
We'll be in so much trouble if you lose that thing.