Endonyms (also called autonyms) and exonyms are names or places, peoples or languages as used, respectively, by insiders (in their own language) and outsiders. Examples are España and (in English) Spain, Apache and Diné, français and French.
In recent decades it has become customary in some Western languages, especially English, to replace traditional exonyms with supposed endonyms for peoples and places that are, in some sense, remote or exotic. Thus, the peoples that I first learned about as Eskimos, Lapps, Bushmen and Gypsies are now called, respectively, Inuit, Saami, San and Roma or Romani. (I have always had trouble with the last of these, because, in my experience, outside the Balkans few Gypsies refer to themselves as Roma when they are not speaking Romani.) The usual excuse for the substitution is that the traditional names are pejorative, either originally (that has been asserted about Eskimo and Bushman, though San may also be pejorative) or by later association, for example by referring to the derivation of the verb ‘gyp’ from Gypsy. But the similar verbs ‘welsh’ and ‘jew’ have not led to the abandonment of Welsh and Jew as ethnic designations, prolbably because they are too familiar.
I have previously written about how the name of the now-Ukrainian city historically known in English as Lemberg has had to go, in English-language media, through Lwów, L’vov and L’viv, none of them easily pronounceable in English. But nobody, to my knowledge, has proposed renaming Copenhagen as København, Munich as München, Warsaw as Warszawa, or even Bangkok as Krung Thep. The only recent renaming in English of well-known places from exonym to endonym (what I will call endonymization) that I’m aware of has happened in India (Calcutta to Kolkata, Madras to Chennai, Bombay to Mumbai), made possible by the fact that English is an official language there. (In the case of Bombay it is specifically the Marathi endonym that has prevailed over the Hindi one.)
The two major endonymizations that happened in the first half of the twentieth century are Constantinople to Istanbul and Persia to Iran. The latter has been quite useful in allowing a distinction between Persians as an ethnicity and Iranians as citizens of Iran, who may be Azeri, Kurdish, Armenian or of any number of other ethnicities. Supposedly, a reason of the change from Burma to Myanmar was to allow a similar distinction between the Burmese ethnic group (also called Bamar) and the Myanma nationality (which includes Shan, Karen, and others); but this doesn’t seem to have taken hold. The change of Siam to Thailand (from one exonym to another) has had the opposite effect: ‘Thai’ is now applied to all the country’s denizens, including those of non-Thai ethnicity (hence ‘Thai Malay‘).
What is striking is how sometimes the exonyms for neighboring nations differ drastically from the endonyms. Take the island of Great Britain: England’s neighbors, Scotland and Wales, are Alba in Gaelic and Cymru in Welsh, while in these languages England is respectively Sassain and Lloegr. Sweden and Finland are respectively Sverige and Finland in Swedish, Ruotsi and Suomi in Finnish. Bohemia is Čechy in Czech, Böhmen in German; Germany (Deutschland) and Austria (Österreich) are respectively Německo and Rakousko in Czech. Greece (Ελλάδα, Elláda in Greek) is Greqia in Albanian; Albania (Shqipëria in Albanian) is Αλβανία (Alvania) in Greek. Note that in the last case the exonyms are similar to those in other languages, except Turkish, which has Yunanistan for Greece and Arnavutluk for Albania.