I put the teacher learns, how is that wrong?
It isn't. "The teacher learns" is a correct translation, too, and Duolingo should have accepted it.
You have to enter the German words here, not the translation.
Ah, okay. I didn't do the exercises so I assumed that the task was to translate the sentence.
Previously it said teacher was a feminine noun now it says its masculine. How so?
"The teacher" can be translated as either "der Lehrer" or "die Lehrerin".
der Lehrer = the (male) teacher, masculine noun
die Lehrerin = the female teacher, feminine noun
I think you are confusing the plural of teacher which is die Lehrer.
which one is correct? die lehrer od der lehrer?
Die lehrer = the group of teachers with at least one male teacher
Der lehrer = the (male) teacher (there is only one teacher)