Once you have completed the basic tones of Mandarin, you will start to notice that they often change. For example, you will hear:
For 你好 (Hello), you will say 【ní hǎo】 instead of 【nǐ + hǎo】；
For 不客气 (You are welcome), you will say 【bú kè qì】instead of 【bù kè qì】
When and where do they change? Actually, there are some specific rules that cause Mandarin tones to change in certain situations. These rules are called the Tone Sandhi.
As a Chinese, I don't remember when I learned these rules at school, I probably unconsciously acquired it. But having thought about it, I realized they are true, and that I follow it.
Let's take a look at these rules, and I will add some examples for each of them:
Rules for third tone
1. A third tone followed by another third tone becomes a second tone.
When there are two third tones in a row, the first one changes to a second tone.
  →  
- 你好 (hello): nǐ hǎo → ‘ní hǎo’
- 很远 (very far): hěn yuǎn → ‘hén yuǎn’
- 老虎 (tiger): lǎo hǔ → ‘láo hǔ’
2. A third tone becomes a “half third tone” if followed by a first tone, a second tone, or a fourth tone.
This ‘half third tone’ is a low-pitch tone that falls slightly.
 [1/2/4]→ [half third tone] [1/2/4]
- 考试 (exam): kǎo shì → kao shì
- 草莓 (strawberry): cǎo méi → cao méi
- 卡车 (truck): kǎ chē → ka chē
Rules for 一
The character 一 (one) is normally first tone (yī), but this changes in two situations.
1. 一 is second tone when followed by a fourth tone.
[一1]  → [一2] 
- 一个 ...(one …): yī gè → yí gè
- 一切 (all): yī qiè → yí qiè
2. 一 is fourth tone when followed by a first, second, or third tone.
[一1] [1/2/3] → [一4] [1/2/3]
- 一般 (normally): yībān → yìbān
- 一起 (together): yīqǐ → yìqǐ
- 一杯水( A glass of water) yī bēi shuǐ → yì bēi shuǐ
A rule for 不
不 is normally the fourth tone (bù), but there is one situation where this changes:
不 is second tone when followed by a fourth tone
[不4]  → [不2] 
- 不是 (is not): bù shì → bú shì
- 好久不见（Long time no see）hǎo jiǔ bù jiàn→ hǎo jiǔ bú jiàn
- 不会 (will not, cannot): bù huì → bú huì
It is important for beginners to memorize these rules, because sometimes textbooks will not remind you.
Hero image by Michael Davis-Burchat (CC-BY-ND-2.0)