Here is a lesson most people could use.
When saying you are sorry, the first thing is to mean it. It does no good to apologizse and then go right out and do it again, nor does it help if you are only saying it to "get the other person off your back".
Next, do this face to face, sit down together and speak directly to the person you have offended.
Do not make excuses, excuses are only good for the people making them, the people hearing them don't really care or need to know.
Be specific, "I did___. I am sorry. I will try not to let it happen again." Don't say never or make promises you are unable to keep.
Most of all be sincere.