The short answer
The three words commonly used for a pastor are shepherd, teacher and leader. Some writers use servant in place of leader. The Bible does not give one official set of three words. These are a useful summary of the role, drawn from the Bible’s language for pastors and elders.
Why pastor means shepherd
The English word pastor comes from the Latin word for shepherd, and the image is central to how Scripture describes Christian leaders. Ephesians 4:11 names pastors and teachers together as gifts Christ gave to the church.
Shepherd: care and protection
Jesus calls himself the good shepherd, who lays down his life for the sheep (John 10:11). Ezekiel criticizes shepherds who feed themselves instead of the flock (Ezekiel 34:2). Peter tells elders to shepherd the flock of God, not under compulsion but willingly (1 Peter 5:2). The shepherd picture points to care, feeding, protection and guidance.
Teacher: explaining the truth
Paul says an overseer must be able to teach (1 Timothy 3:2). He must also hold firm to the trustworthy word, so that he can give sound instruction and answer those who contradict it (Titus 1:9). Teaching in this sense means explaining what Scripture says and what it means for daily life.
For a broader look at teaching roles in Scripture, see who were teachers in the bible.
Leader: guiding the church
Hebrews 13:17 asks believers to obey their leaders and submit to them, since those leaders keep watch over their souls and will give an account. Paul also tells the church to respect those who have charge over them in the Lord (1 Thessalonians 5:12), and he says the one who leads should do so with zeal (Romans 12:8).
Leadership in this sense is guiding people toward faithfulness, usually through example as well as direction.
Servant: a word that fits too
Some writers use servant for the same work. Paul calls himself and Apollos servants through whom the Corinthians came to believe (1 Corinthians 3:5). Jesus describes greatness as service (Mark 10:43-45). The Greek word behind deacon means servant, so the word can point to the humble side of pastoral work.
How the three fit together
A pastor who shepherds people will usually also teach and lead them. The three overlap, and a single pastor may be stronger in one area than another. What matters most is that they work together. Care without teaching can become sentimental, teaching without care can become cold, and leadership without either can become controlling.
The New Testament terms
The New Testament uses three words for this office: elder (presbyteros), overseer or bishop (episkopos), and shepherd or pastor (poimen). Acts 20 uses elders and overseers for the same group of leaders (Acts 20:17, 28). Different traditions use these terms in different ways, so it helps to check how your own church understands them.