Tāmen shàngkè, wǒ zǒujìn jiàoshì lái le.
False: 他们上课,我走进教室来了。
Tāmen shàngkè de shíhòu, wǒ zǒujìn jiàoshì lái le.
True: 他们上课的时候,我走进教室来了。
句子的原意是,“我走进教室来了”发生在“他们上课”这段时间里。在汉语里应把主谓词组“他们上课”用在“……的时候”的前边,作时间状语。
The sentence means that "my coming into the classroom occurred during the time they were having class". To express such meaning in Chinese, a subject-predicate phrase such 他们上课 should be used with 的时候 after it, together serving as the adverbial adjunct of time.