When you begin to study pinyin, you must learn some rules of pinyin. The following ones are the most important principles you should grasp.

1. Standard principles:

1.1 Words would be the basic units for spelling the Chinese Common Language.
人 rén (person/people)
朋友 péngyou (friend[s])

1.2 Structures of two or three syllables that indicate a complete idea are linked:
全国 quánguó (the whole nation)
对不起 duìbuqǐ (sorry)

1.3 Separate terms with much more than 4 syllables if they're able to be separated into words, or else link each of the syllables:
无缝钢笔 wúfèng gāngbǐ (seamless pen)
研究生院 yánjiūshēngyuàn (graduate school)

1.4 Reduplicated monosyllabic words are linked, but reduplicated disyllabic words are separated:
人人 rénrén (everybody)
尝试尝试 chángshi chángshi (give it a try)
Juxtaposed reduplications (AABB structures) are separated by a hyphen:
来来往往 láilái-wǎngwǎng (come to and fro)
清清楚楚 qīngqīng-chǔchǔ (be clearly)

1.5 In particular conditions, for that function of creating it hassle-free to read and realize the words, a hyphen might be added:
环保 huán-bǎo (environmental protection)
十七八岁 shíqī-bā suì (17 or 18 years old)

2. Nouns:

2.1 Monosyllabic prefixes and suffixes are linked with nouns. Prefixes:副 fù- (vice), 总 zǒng- (general/main/chief), 非 fēi- (non), 反 fǎn- [anti], 超chāo- (super/surpass), 老 lǎo – (old/venerable), A – (marker of a nickname/endearment), 可kě (-ble),无 wú- (non), and so forth. Suffixes: -zǐ, -ér, -头tóu (head, nominal ending), 性-xìng (nature),者/员 -zhě/yuán (-ist), 家-jiā (expert/-ist),手 -shǒu (hand/person/expert/-ist), 化-huà (-ized), 们men (-s/es), and so forth). For example:
副部长 fù-bùzhǎng (vice-director of a [government] department),
总工程师 zǒng-gōngchéngshī (chief engineer)
艺术家 yìshùjiā (artist [in general])

2.2 Nouns along with the directional words/locations them are separated.
门外 mén wài (outside the door)=mén wàimian (/wàibiān/wàitou)
火车上面 huǒchē shàngmian (on the train)
The syllables of lexical items are linked.
海外 hǎiwài (this means “overseas,” not “outside of the sea”)

2.3 Surnames and given names (xìngmíng/míngzi) are written separately in the Chinese Han language. The very first letters of surnames and the given names are capitalized. Pen names and nickname are written due to the same principles:
王建国 Wáng Jiànguó
东方朔 Dōngfāng Shuò
张三 Zhāng Sān
A individual name along with the person’s qualified title are separated:
王部长 Wáng bùzhǎng
李先生 Lǐ xiānsheng/xs
The first letter of private addresses such as Lǎo, Xiǎo, Dà, ā, and so forth are capitalized.. For instance:
小刘 Xiǎo Liú (Little Liu)
吴老 Wú Lǎo (honorable Old Wu)
Once the surname of historically well-known figures is combined by using a respectful or descriptive term by which they can be frequently acknowledged, the syllables are linked, along with the very first letter is capitalized. For example:
孔子 Kǒngzǐ (Confucius)
包公 Bāogōng (Grand Judge Bao)
西施 Xīshī (Beauty Xishi)

2.4 Proper names and general names of places are separated and the first letter of each of the names is capitalized.
北京市 Běijīng Shì (Beijing City)
洞庭湖 Dòngtíng Hú (Lake Dongting)
The monosyllabic prefixes or suffixes of appropriate names and general names are linked. For instance:
景山后街 Jǐngshān Hòujiē (Back Street of Jingshan)
朝阳门内 南小街Cháoyángménnèi Nánxiǎojiē (Southern Small Street Inside the Gate Facing the Sun)
Link the syllables of established names for villages, towns, and other places when it is not necessary to distinguish whether they are suitable names or basic names (the initial letter is capitalized). For instance:
王村 Wángcūn (Wang Village)
周口店 Zhōukǒudiàn (a place near Beijing where the fossilized remains of Peking Man were discovered)
三潭印月 Sāntányìnyuè (Moon Reflected in Three Ponds)

2.5 Private and area names not in the Chinese Han language, depending on the principle of “according to all the customized of the people in question”, are written either in the original language or transcribed in Roman letters. For example:
爱因斯坦 Einstein (ài’īnsītǎn)
伦敦 London (Lúndūn)
华盛顿 Washington (Huáshèngdùn)