In the sentence, "When the school bell rang the children left the classroom," the word "When" functions as a subordinating conjunction. It introduces a dependent clause ("the school bell rang") that provides the condition or time frame for the main clause ("the children left the classroom"). Therefore, the correct option is (B) Subordinating conjunction.