All apologies are not created equal. Giving a sincere apology is the first step down the path to recovery after a bad fight, while an insincere apology may prolong or worsen your current argument. Even if you felt justified during the heat of the moment, many times getting into an argument yields only one truth -- at some point you will have to apologize. Even if you and the person that you were at odds with were both at fault during the fight, someone must apologize first. Being the first to apologize often means swallowing your pride and admitting your part in the argument while being careful to not place blame on the other person during your apology.
Allow the dust to settle. Even if you are ready to apologize, the person with whom you have fought may not be ready to hear your apology. People process arguments differently, so while you may have had time to calm down and think things over, the other person may still be angry.
Prepare your apology beforehand to avoid forgetting key elements. Clearly identify what went wrong and focus on identifying what you did wrong by using "I" statements including "I'm sorry" and "I was out of line for..."
Be sincere in your apology. A sincere apology should both acknowledge that you are sorry for your actions during the fight while also acknowledging the other person's feelings.
Acknowledge what went wrong during the fight and offer to make amends by devising ways to change the behaviors that lead to the arguement.