Translation:The children need to listen to their teacher.
Think if it as the differance between "to hear" (å høre) and "to listen" (å lytte). Hearing a song can mean that the song is playing in the background, you can hear the sound, but you do not necessarily need to be focused on it. Listening, however, is the song playing and you listening to the lyrics/melody, and making putting an effort into it
Why "sin" and not "deres" for "their"?
That's because 'sin' points to the subject in the sentence (which is 'Barna', and that's why it's 'sin' and not 'deres' (it's their teacher, not somebody elses).
Here's a variant where 'deres' is correct:
"Barna besøker en annen klasse og må lytte til læreren deres."
So her we use 'deres' because it points to that other class' teacher and not the subject's teacher.
The form of the possessive depends on the object being possessed. For example:
The children must listen to their teacher. (Teacher, singular object.)
Barna må lytte til læreren sin.
The children must listen to their teachers. (Teachers, plural object.)
Barna må lytte til lærerne sine.
a child - the child - children - the children
et barn - barnet - barn (*) - barna/barnene
Note that the indefinite plural is usually -er, but not monosyllabic neuter nouns, such as 'barn'. So this sentence does indeed refer to some specific children, like the ones in class.
Along with, "The children need to ... ," the following are accepted:
The children must listen to their teacher, (n.b., there is no, "to," after the word, "must.")
The children have to listen to their teacher.
If you tried them and they were rejected, it may have been that there was another error or perhaps there was a grading bug.