For example, Italy has a Prime Minister while Germany has a Chancellor. They have the same job but a different title.
In the United Kingdom, the Chancellor means the Chancellor of the Exchequer, the person in charge of the country's finances (taxes and spending). Also in the United Kingdom, there is a Lord Chancellor.
Chancellor is also a title given to public officials in some other countries. For example, Daijō-daijin or Chancellor of the Realm was a government position in Japan in the late Nara and Heian periods.