from こそあど (ここ、そこ, あそこ, etc) どう, but nominalised with か.
Whether or not
Used with か どうか.
先生が学校に行ったかどうか知らない I don't know whether or not teacher went to school
行くかどうか、確認しています I will confirm whether or not we will go.
Often seen with Question word, such as 何かどうか