The two verbs tì (替) and dài (代) both mean to replace someone in doing something so that the person doesn’t have to it himself. The slight difference is that dài (代) tends to convey the meaning of doing something on behalf of somebody, while the use of tì (替) inclines to mean to substitute somebody in doing something. They generally take personal pronouns or nouns representing people as the object.
他替那个受伤了的球员打完了下半场的比赛。
He substituted the injured player in the second half.
tā tì nà gè shòu shāng le de qiú yuán dǎ wán le xià bàn chǎng de bǐ sài.
请代我向你的家人问好。
qǐng dài wǒ xiàng nǐ de jiā rén wèn hǎo.
Please give my regards to your family.
Tì (替) is more likely to be used in colloquial expression, while dài (代) is often used in more formal and generalized occasions and could form a few fixed expressions which cannot be replaced by tì (替), for example:
dài gòu (代购) to buy on somebody’s behalf / the purchasing agent
dài kè (代课) to take over a class for an absent teacher
dài bàn (代办) to act on somebody’s behalf
Tì (替) also has its exclusive fixed expression like tì shēn替身(stand-in).
Tì(替) could function as a preposition which conveys the meaning of “for” in “ do something for somebody”, but dài (代) can’t.
我真替你感到高兴。
wǒ zhēn tì nǐ gǎn dào gāo xìng.
I'm so happy for you.
你能替这个女孩照个相吗?
nǐ néng tì zhè gè nǚ hái zhào gè xiàng ma?
Can you take a picture for the girl?