The word pastor can refer to different types of church leader.
In the Protestant Christian tradition, a pastor is someone who holds a position of authority and is responsible for the spiritual care and ministry of their congregation. This usually consists
of teaching scriptures, leading worship, performing baptisms etc…
In other denominations or traditions like Catholicism priests are ordained by those with higher authority than they have themselves. A Pastor never has that kind of absolute power within their confessional/religion because we don’t believe in that (it leads to abuse). Pastors are only accountable directly to God while priests are accountable to both God and an over-arching church hierarchy.
The difference often lies in what type of religion the denomination practices