Tú le dices a la profesora que el examen fue difícil.
The indirect object replaces the one who receives the verb. It can be replaced, if it is in the third person, "le" (singular) or "les" (plural); they can also be replaced by unstressed pronouns (me, se, te, nos, os).
In this case, as it is "la profesora" (the teacher), the stressed pronoun is "ella" (she), that is, it is replaced by "le".
MissSpanish