DE1 – 的 (see separate article)
This is in fact the most common character in Mandarin, so if you’re not sure what to write, pick this one. It is used for a lot of things, but in general, it’s used to show that something describes whatever comes after by limiting it. The most common manifestation of this is a normal possessive. For instance, if we have two words, 我 wǒ "I" and 房子 fángzi "house, room", we can use 的 to show that the first one limits the second. In other words, if we say 我的房子, we’re not talking about any old house, it’s my house. You can do the same with colours, so 白色的房子 báisè de fángzi doesn’t refer to any house, but a white house.
DE2 – 得 (see separate article)
This second "de" is used for a number of different things in Mandarin and here we’re going to look at the two most common. First, it’s used to link an adverb to a verb, i.e. it’s used to add words to actions that tell us more about the action. For instance, we can say 跑 pǎo "to run", and if we want to add that someone runs very fast, we can say 跑得很快 pǎo de hěnkuài. Similarly, if you want to say that your Chinese isn’t so good, you can say 我中文说得不好 (我中文說得不好) wǒ zhōngwén shuō de bùhǎo "I don’t speak Chinese well". Not that "well" here is preceded by the action and then 得.
Second, 得 can be used to show potential. This is too complicated to describe in full here, but if you want to express that someone is able to or has the potential to do something you can say 做得到 zuò de dào. Using 得到 in this way is very common, but there are other examples al well, such as 听得懂 (聽得懂) tīng de dǒng "be able to understand" and 看得见 (看得見) kàn de jiàn "be able to see (something)".
DE3 – 地 (see separate article)
The third and last DE particle is 地 and it is much less common than the above two and its usage is also more limited. It’s mostly used when placing an adverb before a verb, so the word order is the opposite of 得. Here are a few examples:
轻轻地 (輕輕地) qīngqīng de "lightly"
慢慢地 (慢慢地) mànmàn de "slowly"
Note that 地 is placed before the action and that the word describing the action comes before 地.
Also note that 地 can be pronounced "dì", in which case it means "ground". This pronunciation and usage is separate from the grammar particle discussed here, don’t confuse them!
Conclusion
If you don’t pay attention to the function of these particles, they will be very hard to use correctly, but if you learn how they are used, they are easy to separate. If you want a quick and dirty rule, try this: if it comes before the verb, it should be 地. If it comes after the verb, it should be 得. If it’s not about a verb at all, it should be 的.