Customers are not always right, but if you value their business, you have to make them feel like they are. Even if they don't get exactly what they want, they should leave feeling valued. If you know a customer is in the wrong, consider how necessary it is to correct them. Don't just order them not to do something or give them a flat refusal. Ask them questions and show you're really listening to their problem or explanation.
With these questions, try to help them come to an understanding of their mistake for themselves. The more they talk about it, they may calm down and become more reasonable. You could also direct them to a certain policy and have them read it out loud for themselves.
Let them know that your policies are in place because you care about customers like them. This works especially well if there's a health and safety issue, for example, you can't sell something to someone of a certain age or weight, or your service or product can't be used in a certain way. If you can't deliver something as fast as they want, it's because you care about the best quality service, not just speed.
If you can't grant a customer's request, try to offer attractive alternatives rather than just saying no. If the alternative sounds even better than what they were asking for, they'll leave satisfied. An added offer of a benefit the next time they come adds to their feeling of value and motivates them to return.
Hear them out first
Help them realise their mistake themselves
Show that you care