Questions & Answers about Когда в комнате душно, я иду к окну и открываю его.
Когда introduces a time clause and normally means when (a time condition), not if (a hypothetical condition). In this kind of sentence it usually implies something habitual/typical: “Whenever it’s stuffy in the room, I …”.
For a more hypothetical “if,” Russian typically uses если.
Russian separates a subordinate clause from the main clause with a comma.
Here, Когда в комнате душно is the subordinate clause, and я иду к окну и открываю его is the main clause, so the comma is required.
Душно is a “category of state” word (a predicative adverb) used in impersonal sentences: душно = “(it is) stuffy.”
Russian often expresses “it is + adjective” without a verb, especially for weather/conditions: холодно, жарко, темно, душно, etc.
In the present tense, Russian usually omits the verb быть (“to be”).
So в комнате душно literally is “in the room (is) stuffy,” with is understood.