Exonyms and endonyms
Peking is an example of an exonym, a name given to a place or group of people by foreigners. Other exonyms for places in China include Canton, Amoy, Macau and China itself. The endonyms or autonyms (native names) for these places are 广州 (Guǎngzhōu in Mandarin, Gwóngjàu in Cantonese); 厦门 (Xiàmén), 澳門 (Ngoumún) and 中国 (Zhōngguó).
English exonyms for countries in Europe include:
Croatia (Hrvatska), Finland (Suomi), Germany (Deutschland), Hungary (Magyarország), Poland (Polska), Spain (España), Sweden (Sverige) and Wales (Cymru)
English exonyms for cities in Europe include:
Copenhagen (København), Moscow (Москва/Moskva), Prague (Praha), Rome (Roma), The Hague (Den Haag), Munich (München), Cologne (Köln), Vienna (Wien) and Warsaw (Warszawa)
(the endonyms are shown in brackets)
Exonyms are used in other languages, of course, not just in English. For example, London is called Londres in French, Spanish and Portuguese, Londra in Italian and Romanian, Llundain in Welsh, Lunnain in Scottish Gaelic, ロンドン (rondon) in Japanese, and 倫敦 [伦敦] (Lúndūn) in Mandarin.
You can find the native names (endonym/autonyms) of all the countries of the world here and the native names of many languages here, and a good place to find both exonyms and endonyms of countries, cities, languages, etc. is www.geonames.de