Chinese is very different from other languages that use alphabet because it’s written form is not directly linked to it’s pronunciation.
In order to provide a phonetic way to express the sounds of Chinese and also for using dictionaries, Chinese linguists with the help of Soviet sinologists drafted the “Scheme for the Chinese Phonetic Alphabet”. In 1958, Chinese government passed the law to use this scheme, today known as pinyin or literary, “arranged sounds”. Pinyin uses the Latin alphabet to transcribe Chinese characters. Nowadays, most people who study Mandarin Chinese, start learning the language from pinyin, it’s compulsory in Chinese schools and basically, every Chinese in Mainland China starts learning pinyin since kindergarten (5-6 y.o.). However, old generation of Chinese (born before 1958) may not necessarily know how to write in pinyin.