First, it is a gift of grace from the Lord:
"But to each one of us grace was given according to the measure of Christ’s gift.
8 Therefore He says:
“When He ascended on high,
He led captivity captive,
And gave gifts to men."
Furthermore, teaching is one of the doma gifts of rule that comprise the core of God's government:
"And He Himself gave some to be apostles, some prophets, some evangelists, and some pastors and teachers..."
The intent of these endowments of power is to build up the saints so that they may function in their own gift of grace:
"...for the equipping of the saints for the work of ministry, for the edifying of the body of Christ, 13 till we all come to the unity of the faith and of the knowledge of the Son of God, to a perfect man, to the measure of the stature of the fullness of Christ..."
Very often, equipping the saints includes strengthening their ability to give an answer for the hope that is within them. Like Peter wrote about:
"But sanctify the Lord God in your hearts, and always be ready to give a defense to everyone who asks you a reason for the hope that is in you..."
This is a hope that is compared to light and is often the opposite of the darkness in the world. Indeed, the ways of the world are darkness and in them is no light or hope. As a "city on a hill" we are to be beacons of the only hope in the world: Christ Jesus the Lord.
This was just the tee up.
To understand the gift of teaching we must begin with the WHAT the teacher teaches. The medium of the teacher is the Word of God. Too often people are elevated because they are opinionated or loud, or, like what began in the 60's and 70's, they "preach" political messages that resonate with one particular worldview. Their messages are irrelevant in the Kingdom and to the Lord but such people become popular and wealthy because unregenerated people are given to support what they like vs. what s true.
People have a body, soul, and spirit. Without being changed by Christ, a person's appetite remains fixed in a state called "lost". They will then support things that ultimately benefit themselves. Be it politics, wealth, safety, etc. their choices are predicable. Merely answer the question: "how does the choice before me benefit my current lifestyle?" and their behavior is apparent.
But the Word of God (by this, I mean what has been written (The Bible: Logos) and what God is saying in the day (revelation: rhema), in the hands of a gifted teacher, separates between the mind of the soul and the mind of the spirit:
"For the word of God is living and powerful, and sharper than any two-edged sword, piercing even to the division of soul and spirit, and of joints and marrow, and is a discerner of the thoughts and intents of the heart."
So, a teacher of God, understanding they are accountable to God and not to man, will often say things that are unpopular. They will not teach their own opinions but only what they receive from the Lord. However, they do not seek to be controversial - They know they are ultimately gifted to build up the saints and the Body of Christ.
As an aside, Billy Graham, before his death, stated he regretted his trek into American politics - understanding that his partisanship corrupted the Word of the day. This is the burden of a teacher: to remain true to the Lord one cannot curtail the word they are given to appeal to men.
This is just an outline but it is the general gist of "teaching".