Rendering Chinese languages in the Roman alphabet is a difficult problem, as Chinese uses a number of sounds not found in English or other European languages and vice versa. Several "romanization" systems have been developed that attempt to bridge the gap; the two most widely known are the Pinyin (literally "spelled sound"; formally known as Hanyu Pinyin) system developed in China in the 1950s and Wade-Giles, which was developed by two British diplomats at the end of the 19th century. To make things even more confusing, most place names in China were written by English-speakers using the Chinese Postal Map Romanization, which gave us the oddities of Peking for modern Beijing, Keelong for modern Jilong, and Canton for modern Guangzhou.note The Postal Map system derived from traditional names, which appeared in the 16th and 17th centuries, based on pronunciations in Min, Cantonese, Hakka, and some now-long-forgotten southern dialects of Mandarin; the Wade-Giles transcriptions are Pei-ching, Chi-lung, and Kuang-tung, respectively. The People's Republic of China declared in 1979 that the Hanyu Pinyin system was the only acceptable system, changing the spelling of Chinese proper names when printed in other countries, hence this article's title: Mao Tse-tung became Mao Zedong.
The Tongyong Pinyin (lit. Universal/General Use Spelling Sounds) system was the official romanization system of the Republic Of China (Taiwan) from 2002 till 2008. Tongyong Pinyin was designed to be more intuitive for non-Chinese speakers. It was also claimed to be useful for romanizing non-Mandarin Chinese. Despite this, street signs in Taipei City generally used Hanyu Pinyin while other cities used Tongyong Pinyin. In addition, the Wade-Giles system is still widely used in some instances, such as place names and personal names, hence Taipei instead of Taibei or Kaohsiung instead of Gaoxiong. The ROC adopted the Hanyu Pinyin system in 2009, though Wade-Giles is kept.
According to The Other Wiki, these systems are transcriptions of Chinese rather than transliterations: that is, they attempt to map sounds to letters instead of characters to letters (as would be the case for, say, languages written using the Cyrillic alphabet). This is because Chinese writing is logographic, not alphabetic, i.e. its characters were developed as representing meanings rather than sounds (although Chinese does have the native Zhuyin Fuhao phonemic alphabet, which Pinyin replaced on the mainland, but which is still used in Taiwan.) In the case of Pinyin, this mapping is done without following the usage of any other language that uses the Roman alphabet, which can result in confusion when read by those unfamiliar with Pinyin. For example, Q represents something like the '-ch' sound, as in the Qin and Qing Empires (though there is a distinction between the 'Q' and 'Ch' sounds, actually). Tones are represented by diacritic marks.
It may be tempting to view Pinyin (and other romanization systems) as a method to kludge the Chinese language onto a keyboard, but that is not the case. The Communists did plan to abolish hanzi altogether in the 1950s and 1960s (and eventually gave up), but the development of Hanyu Pinyin was parallel to this. That said, Hanyu Pinyin is one of the most common computer input methods for Chinese.
As if things are not messy enough, the things we've covered up to this point are mainly about romanizing Standard Chinese, which is the official language of both Mainland China and Taiwan. In Hong Kong and Macau, Cantonese (a variety of Yue Chinese) is the official language. They use two romanization systems, Yale and Jyutping. Names of people from Hong Kong and Macau are officially in Cantonese (unlike China and Taiwan where names are officially in Mandarin regardless of what dialect you might use), therefore they are represented in foreign media with these romanizations. However, for Chinese people outside of the Cantonese-speaking area, they will most likely apply the mandarin pronunciation and romanize it with pinyin. For example, Wong Kar-wai is pronounced as Wáng Jiāwèi in mandarin, and Chinese areas not speaking Cantonese will most likely romanize his name as such.
Another notable dialect is Hokkien (a variety of Southern Min Chinese), which includes Taiwanese Hokkien, a major dialect in Taiwan, and several dialects spoken in Southeast Asian Chinese diaspora, due to the historical emigrations of Chinese people from that region. Variants of this dialect is romanized with the Pe̍h-ōe-jī.
One more note: names of Overseas Chinese in Southeast Asia nations such as Singapore and Malaysia are generally romanized with Wade-Giles. Some Overseas Chinese have names read in dialects (mainly the aformentioned Cantonese and Hokkien), and are romanized with their respective systems in these cases.