This has to do with parts of speech and their use in a sentence.
As in English, a French relative pronoun links a dependent/relative clause to a main clause. Que, qui, lequel, dont, and où are the French relative pronouns, and there's no one-to-one equivalent for these words - depending on context, the English translation may be who, whom, that, which, whose, where, or when.
Indefinite relative pronouns link relative clauses to a main clause when there is no specific antecedent. The indefinite relative pronouns are ce que, ce qui, ce dont and quoi. These pronouns are often used as subjects or objects of a sentence.
Do you understand what a clause is in English? This is key to understanding this concept in French. A clause is a group of words with a verb. If it does not have a verb, it is NOT a clause but a phrase. There are different types of clauses. An independent clause has a verb and a noun subject and can stand alone as a sentence. A dependent clause cannot stand alone as a sentence. For example, consider this sentence:
This is the book that I have read.
The clause "this is the book" is independent. It could stand alone as a sentence because it has a subject, a verb and makes sense as a sentence.
"that I have read" is also a clause, but it is dependent. The word "read" is the verb, but there is no complete thought. It DEPENDS on the independent clause to make sense, that is why it is called a dependent clause.
Another word you need to know is the word antecedent. An antecedent is a word to which a pronoun refers, as in:
I have a younger brother and he is very cute.
In this sentence the pronoun "he" refers to the younger brother, so "brother" is the antecedent of the pronoun "he".
Back to the French, then. On your test, you will need to look for ANTECEDENTS because that is when you will choose DONT. If there is NO antecedent, you would choose "ce qui" or "ce que". Also, if the word "de" (of) is present, that is also a clue to use DONT.
Consider this sentence: Où est le reçu ? J'ai besoin du reçu.
> Où est le reçu dont j'ai besoin ?
Where is the receipt (that) I need?
See how there is a "de" in the above sentence (du = de + le). There is an antecedent in this sentence, "reçu" - so these two "clues" tell you to use dont.
Also:
C'est la dame. J'ai parlé de cette dame.
C'est la dame dont j'ai parlé.
That's the woman about (whom) I talked. (That's the woman [that] / [whom] I talked about.) Again, we have a "de" and an antecedent (dame) so you need dont.
The relative pronouns "ce qui" and "ce que" serve as subjects or objects of sentences:
Ce qui m'intéresse, c'est la langue.
What interests me is language.
See how "ce qui" is the subject of the sentence? "What interests me" is a dependent clause that is the subject of the sentence. No "de" and no antecedent.
See the following additional examples:
Sais-tu ce qui lui plaît?
Do you know what pleases him?
C'est ce qui me dérange.
That's what bothers me.
Tout ce qui brille n'est pas or.
All that glitters is not gold.
Notice that there is no preposition "de" in any of the above sentences.
Bonne chance avec l'examen!