You have heard that it was said to those of old, ‘You shall not murder; and whoever murders will be liable to judgment.’ But I say to you that everyone who is angry with his brother will be liable to judgment; whoever insults his brother will be liable to the council; and whoever says, ‘You fool!’ will be liable to the hell of fire.
Matthew 5:21-22

The Law doesn't allow courts of men to punish someone for harboring animosity, but it doesn't prohibit God from judging. Leviticus 19:17 says "You shall not hate your brother in your heart, but you shall reason frankly with your neighbor, lest you incur sin because of him." In other words, don't berate him for an offense or a difference of opinion, but have a conversation. Learn the whys and wherefores before judging him and realize that you are often at fault too.

Yeshua wasn't telling us never to be angry or to curse anyone. He was saying not to nurse our anger or to curse unjustly, but to repent and forgive quickly.