This is the difference:
The conjunction 'whether' means 'if x or not', so 'whether' includes the idea of 'if', plus the negative possibility. This means that you can usually replace 'whether' with 'if', but not vice versa. If you're referring just to one hypothetical situation, you use 'if'; if you're referring to both the hypothetical situation and its opposite, you can often use either 'whether' or 'if'.
For example, in the question "If Jane can't go to the party, will you still go?", you have to use 'if' because only one scenario is mentioned (the possibility of Jane not going to the party).
However, if you say "I don't know whether Jane is going to the party" (meaning 'whether or not': two possibilities) you can replace 'whether' with 'if', and the meaning is still the same. "I don't know if Jane is going to the party" is an acceptable equivalent.
There's also a word-order issue here. You can say either "I don't know whether Jane's going to the party or not" or "I don't know if Jane's going to the party or not".
However, if you put 'or not' directly after the conjunction, only 'whether' can be used. For example, you can't replace 'whether' with 'if' in a sentence such as "I don't know whether or not Jane is going to the party" - 'if' is not possible here.
I hope that makes sense.