"If" has many more uses, "whether" is a very specific use.
"Whether or not..." is the most common way to use it.
For example,
"Whether or not my futbol team wins, I will have fun at the game."
or
"Whether or not I pass this class, I still learned a lot."
(So in these cases, "whether or not" means that in both situations, X will happen)