Can some one explain me. This sentence:"He taught constantly for forty-five years. ". Here's used Past simple. I would like to know, why, and can I use past continuous:" He was teaching constantly for 45 years".
Ivan, Welcome to EL&U. This distinction between Simple Past tense and Past Perfect is one that causes many people problems, mostly becasue the difference can be quite subtle. I have found a good description of the use of the Past Perfect on englishpage.com which says
The past perfect is a verb tense which is used to show that an action took place once or many times before another point in the past.
The problem is that the Simple Past can seem to do the same thing sometimes but the difference is that the Simple Past is not, usually related to another event mentioned in the same sentence or one placed close to the one containing the Past Perfect use.
For example your sentences might be used as clauses in a biography where we could say either:
Alexei had a long career as a teacher, he taught constantly for forty-five years
Alexei had a long career as a teacher, before he retired he had taught constantly for forty-five years
In the first case there is only one event mentioned, although a very long one. That is Alexei taught for forty-five years. As it is the only event mentioned we use the Past Simple.
In the second case there are two events mentioned: Alexei retired and, before that, he taught for forty-five years. As the teaching came before the retirement, both events are mentioned and the retirement is also in the past we use the Past Perfect.
What makes it confusing is that, when the second event ends the period when the first even happened (as with retirement) we can still use the Simple Past as an alternative. We could say
Alexei had a long career as a teacher, before he retired he taught constantly for forty-five years
However we can't usually use the Past Perfect without annother event so
He had taught constantly for forty-five years
would sound odd unless a previous sentence mentioned another event. Perhaps
After retirement Alexei went travelling. Before that he had taught constantly for forty-five years
I hope this helps.