1. If you were wrong, admit that you were wrong.
2. Say something along the lines of “I’m sorry. I regret what I said/did.”
3. After you apologize, STOP TALKING. I cannot stress this enough.
4. For example, if you happen to be a person of the cloth and are blessing businesspeople, and as part of that benediction you work in something about being blessed so much that you would make a Jew jealous, don’t mention, as part of your apology that you meant it as a compliment to the Jews.
5. As an extra bonus, don’t say that you will avoid making such remarks “with God’s help.” Because not spouting offensive shit shouldn’t take Divine Intervention.