It's considered part of a "four part apology", and is often taught when teaching kids how to apologize.
I'm sorry.
What I did was wrong because ____
Next time, I will ____
Do you forgive me?
Forgiveness is not required (though encouraged), but you should still ask for it. It's not perfect, but following the pattern is something that helps one demonstrate that you understand both why one's behavior wasn't OK (and how it hurt someone else), it also communicates that you intend to change your behavior.
This blog post seems to pretty solidly convey part one, but the others less so. It's still good to see the "I'm sorry".
This blog post seems to pretty solidly convey part one, but the others less so. It's still good to see the "I'm sorry".