“I owe you an apology. It was wrong of me to say that to you.”
You made your sister-in-law angry by criticizing how she disciplines her son. Now you feel bad about what you said, so you want to tell her "sorry".
I owe you an apology. It was wrong of me to say that to you.
"I owe you an apology" means "I think I should apologize to you." You say this when you realize that you did something wrong, and you want to say that you're sorry.
You can also say this to other people if they've done something wrong. For example, you can say this to a child who took a toy from another child:
Kai, I think you owe Nelly an apology.
Use this phrase when someone has done something that they shouldn't have done:
It was wrong of me to doubt you.
It was wrong of him to say that.
Most often, we use this phrase when someone has hurt another person's feelings.
You wouldn't use "It was wrong of ___" if someone broke a rule or law. For example, it would sound strange to use this phrase to talk about a man who hit his wife.