If you want to point out, that you are glad to know this special word now:
Danke für dieses Wort.
But it is better to say thank you to the special person who told you that word:
Danke, dass Sie mir das beigebracht haben.
or, if you use "Du":
Danke, dass du mir das beigebracht hast.
If both, word and person is important, replace "das" by "dieses Wort":
Danke, dass Sie mir dieses Wort beigebracht haben.
The German word "lehren" (English: "to teach") is not very often used in German, and so even many native German speakers do not know how to use this word correctly. I try to give some examples for correct usage of this word in German (I am German native speaker, so maybe the English parts might contain errors, but German translation is correct:
The teacher teaches mathematics
If the teacher is male:
Der Lehrer lehrt Mathematik.
Der Lehrer unterrichtet Mathematik.
Die Lehrerin unterrichtet Mathematik.
My father taught me to swim.
Verbatim translation (which is correct German, but not used in real life):
Mein Vater lehrte mich zu schwimmen.
Mein Vater brachte mir das Schwimmen bei.
Here the verb is "beibringen", which is splitted into "bringen" (past tense: "brachte") and "bei". "Beibringen" has the same meaning as "lehren" or "unterrichten".