Pinyin is a way to write letters showing the sound of a word in place of a Chinese character. Today, it almost always has the sense of Hanyu Pinyin, the way of writing Mandarin sounds which has been used by the People's Republic of China from the 1950s. Other place like the United States and Taiwan used other ways of spelling Chinese (such as Wade-Giles and Tongyong Pinyin) for a long time, but in the late 20th century, they started to use Hanyu Pinyin as well. It is the standard romanization systemin China and in the United Nations and is the most common for Chinese.
Pinyin uses Roman letters in a special way for certain Chinese sounds. For example, the pinyin letter C is pronounced as /ts/ as in the English word "cats" or the Japanese word "tsunami" and does not sound at all like /k/ or /s/ by itself. Pinyin uses special marks to show the four Chinese tones, which are very important in speaking Mandarin correctly.