Step 1: Your apology must be sincere. Are your really sorry, or do you just want them to stop being upset with you? Picture an argument where the other person says “I’m sorry, Okay!” That is probably not sincere. A true apology will be humble and show regret.
Step 2: Try very hard to not do the offense again. Some bad habits are not easily broken, but if you are really sorry, you will make a very strong effort to change that behavior.
This effort will build trust with the other person. If they see you are genuine in your efforts to change, the relationship will become stronger. This should be the reason for the apology, to repair and strengthen the relationship.