Apparently, the terms mean the same thing. They both refer to a teacher.
教師 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 教師.
Teachers often refer to themselves as 先生 in front of their students. This serves to enforce the formal teacher-student relationship and allows the teacher to avoid using 私、僕、俺、all of which are words pregnant with meaning.
教師 - teacher(profession/one`s job)
先生 - similar as miss/mam (while calling) It is not only used for teacher. It can also used to call doctor, researchers etc,.
私は教師です。 - I am a teacher.
彼は私の先生です。- He is my teacher.
So 教師 means “teacher”(occupation), whereas 先生 is a honorific term. All 教師 can be called “先生”, but not all 先生 are 教師。