Questions & Answers about Kiedy słyszę grzmot, od razu zamykam okno.
Polish usually drops subject pronouns when they are clear from the verb ending.
- słyszę = I hear
- zamykam = I close / I am closing
So ja is not necessary here. You could say Ja kiedy słyszę grzmot, od razu zamykam okno, but that would usually add emphasis, like I do this.
Here kiedy means when.
In this sentence it introduces a time clause:
- Kiedy słyszę grzmot = When I hear thunder / When I hear a thunderclap
It is followed by a comma before the main clause:
- Kiedy słyszę grzmot, od razu zamykam okno.
Because Kiedy słyszę grzmot is a subordinate clause, and in Polish subordinate clauses are normally separated from the main clause by a comma.
So the structure is:
- Kiedy słyszę grzmot = subordinate clause
- od razu zamykam okno = main clause
This comma is standard and important in Polish writing.