As the play opens, Demetrius is deeply in love with Hermia and petitions Theseus for the right to marry her. Demetrius scorns Helena, whom he once loved. In act 2, scene 1, as she follows him to the forest where he is searching for Hermia, he treats Helena harshly. He says to her:
Tempt not too much the hatred of my spirit;
For I am sick when I do look on thee.
He also says he wants to leave her
to the mercy of wild beasts.
In other words, he can't convey too strongly how much he loathes her. He wants her to go away. He finds her needy and pathetic, and he despises her.
However, in act 3, scene 2, after he is given the love potion by Puck as he sleeps, Demetrius's language and behavior completely change toward Helena. Instead of trying to escape her, he now tries to pursue her. His speech turns to love. He calls her "goddess, nymph, perfect, divine!"
After his former abusive speech and behavior, in which he conveyed that he wished she were dead, Helena is naturally surprised by this sudden change. Lysander has also been given the love potion and falls in love with Helena. She thinks both men are purposely mocking her to make fun of her loveless state.
Demetrius, however, is utterly sincere. When she angrily accuses him of being cruel, he says:
O, why rebuke you him that loves you so?
While he was formerly the one being stern and cruel, he now says he is
Pierced through the heart with your stern cruelty.
Shakespeare uses this scene to comic effect. As any young person knows, then or now, it is not unusual for young peers to mock one another's vulnerabilities. Demetrius, whose "hate" speech was blunt and authentic, is now speaking in the elevated, exaggerated language of love poetry. It is no wonder Helena doesn't take his words seriously. But in this case, despite the phony sound of the language, the love is real.
Shakespeare is also using Demetrius's change of heart to express his theme that love is changeable and irrational. In this play, it is depicted as a form of lunacy or madness. A love potion may be the surface explanation, but even without the potion, people fall in and out of love for no rational reason.