If someone does evil, don’t feel you have to punish or hate them. That will only hurt you. The universe has a way of balancing things out, and those who do wrong will eventually face the consequences of their actions. Either in this life or a future one. Nobody escapes their karma, not even those who are enlightened.
The difference between the enlightened and the unenlightened is that the enlightened don’t add any more to their karma. They do not hold onto the greed, hate, or delusion associated with it. By not holding onto it there is nowhere in the mind for it to land and take root. And the karma ends right there, in that moment because the enlightened being does nothing that will cause it to rise again.
Everything we do has an effect on the mind and leaves traces on it. The tendencies we indulge in become our karma. They grow and gather a momentum of their own, whether they are good or bad.
Knowing this, a wise person cultivates wholesome tendencies.