Talking about things: da- and wo-
For things or ideas, use da- plus a preposition to refer back, and wo- plus a preposition to ask a question. Add -r- before a vowel: darauf, worauf. For people use preposition plus wen/wem or a personal pronoun.
Understand the idea
Da- and wo-compounds can refer to things, actions or ideas linked by a preposition. They help avoid repeating an entire complement. They normally do not replace a person in the same way; a person is usually referred to with a preposition and a pronoun.
Build it step by step
Combine da- with the required preposition for a reference, and wo- for a question. Add r before a vowel-starting preposition, as in daran or worauf. Keep the underlying verb-preposition combination intact. Some compounds can point forward to a clause or infinitive phrase rather than back to a noun.
See it in a sentence
Ich warte auf das Ergebnis. Ich warte darauf.
Wir sprechen über das Problem. Wir sprechen darüber.
A useful memory aid
Start from the full complement, then replace only the thing or idea. This keeps the preposition connected to the verb's meaning.
A common trap
Do not use a da-compound as your default for a person. Also avoid choosing daran and darauf interchangeably; their prepositions signal different constructions.