'Whether' is a conjunction having the meaning 'if...(or not)' that can introduce two types of clause:
(1) nominal clauses, as in
I don't know WHETHER she's going to come tomorrow.
(2) concessive adverbial clauses, as in
WHETHER it's sunny or not, we'll still go out!
1. In type (1), 'whether' can be replaced by 'if'.
2. In type (1) the words 'or not' are redundant, although - on account of confusion with type (2), where they are obligatory - native speakers often add them.