"If" is used in conditional sentences
If you had time and money to take a trip anywhere, where would you go?
If you had told me you were coming, I would have made a special dinner.
If I fell in love with you, would you promise to be true (The Beatles' song "If I Fell')
"if" or "whether" are used in other cases.
I don't know if she'll come to the party.
I don't know whether she'll come to the party.
Often, 'whether' is used with "not"
I don't know whether or not she'll come.
I don't know whether she'll come or not.
see this for a more detailed explanation: