的, 得 and 地 are all pronounced de with a neutral tone, so you only need to tell them apart when you write. Look at where de sits: 的 comes before a noun, 地 comes before a verb, and 得 comes after a verb.
Look at the words on either side of de. If a noun comes after it, write 的. If a verb comes after it, write 地. If de comes straight after a verb and is followed by a comment on how the action went, such as 很快 or 很好, write 得.
In speech the three sound exactly the same, so nobody will misunderstand you. In writing, textbooks and HSK exams keep them apart, and the wrong one counts as a mistake.
的 links an owner or a description to the noun after it: 我的 (my), 老师的 (the teacher's), 很漂亮的 (very pretty), 我买的 (that I bought). The description always comes first, then 的, then the noun.
When everyone knows which thing you mean, the noun can be left out, so a sentence can also end in 的: 这是我的 means "this is mine". The page on 的 covers this in more detail.
Verb + 得 + comment. 得 comes right after the verb and introduces a comment on how the action is done: how well, how fast, how early. The comment is usually an adjective, often with 很 in front of it.
If the verb has an object, either say the verb twice (说汉语说得很好) or put the object first (汉语说得很好). The object never goes between the verb and 得. For the negative, put 不 after 得: 跑得不快. To ask, put 怎么样 or a yes-no form such as 快不快 after 得.
Description + 地 + verb. 地 turns a word into a description of the action, a bit like -ly in English: 高兴地说 (say happily), 慢慢地走 (walk slowly). The description and 地 always come before the verb.
The word in front of 地 is often a two-syllable adjective such as 高兴, a doubled word such as 慢慢 or 好好, or an adjective with 很, such as 很快. Doubled words can also go straight in front of the verb without 地: 慢慢走 is fine too.
Some ideas can be said with either 地 or 得, but the word order changes. 地 goes before the verb and describes the way someone does something. 得 goes after the verb and gives a comment on how it was done, and that comment ends the sentence.
The most common mistake is writing 的 after a verb: 他跑的很快 should be 他跑得很快. You will see this a lot in casual writing online, but it is marked wrong in exams. The other is putting the object after 得: 他说得汉语很好 should be 他汉语说得很好 or 他说汉语说得很好.
Practise this grammar point on paper: 20 exercises using only HSK 2 words, with an answer key on a separate page. Free to print and copy for your class.
Every example on this page uses only words up to HSK 2. Paste your own sentences into the level checker to see which words, if any, are above your level.