Apparently, the terms mean the same thing.
教師 means "a teacher".
先生 means "a teacher", too. But 先生 can be used for the title of teacher, doctor, writer, politician, artist, and so on.
For example, when a student greets to the teacher in the morning, he can't say "おはようございます、教師。". In this situation, he should say "おはようございます、先生".
先生 can be used as a profession or as a title, and you can call a lawyer or a doctor with sensei. But 教師 is the teacher profession.
Another thing to add is that since 先生 is an honorific term, it is quite impolite to refer to yourself as 先生 even if you are a teacher.
I was instructed by a native teacher to introduce/refer to my parents (who are university professors) as 教師. It is also more clarifying, as Japanese people refer to many occupations with 先生: doctors, writers, lawyers...
Like others said 先生 as a noun could be used for many titles like doctor, teacher, professor etc, while 教師 strictly means "teacher".
However when 先生 is used as a honorific it could also mean "Mr." or "Mrs.", like how you would call your teacher "Mr. Smith", but "Teacher Smith" would sound extremely awkward, that is basically the same idea with 先生 vs 教師.
So 教師 means “teacher”(occupation), whereas 先生 is a honorific term. All 教師 can be called “先生”, but not all 先生 are 教師。