Which of two.
Introducing a direct interrogative question (often with correlative or) which indicates doubt between alternatives.
Used to introduce an indirect interrogative question that consists of multiple alternative possibilities (usually with correlative or).
He chose the correct answer, but I don't know whether it was by luck or (whether it was) by skill.
Without a correlative, used to introduce a simple indirect question.
Do you know whether he's coming?
Used to introduce a disjunctive adverbial clause which qualifies the main clause of the sentence (with correlative or).
He's coming, whether you like it or not.