Do It in Person
No apology is better than one that is made it person. Serious conversations need to be done face to face. So, head over to your friend's home or dorm room and have a heart to heart with them in person. However, it is advised to first figure out what you would like to achieve from the conversation. You might need to schedule a time that is on neutral turf such as during sports practice or recess. Talk to your friend and show them that you care about them. Your friend should know that you feel bad for hurting him and that you want to make amends.
Remember It Is You That Wants to Talk Things Through
You need to be prepared to face the fact that your friend would not see things your way. Everyone has their own opinion about things and it is up to you to empathize or feel neglected. Go through what mistake you have made in your mind. If you slept with your friend's ex without them knowing or you lied to them about something, you need to own up for your mistakes.
Keep In Mind That Things Take Time
It is not necessary that your friend will want to accept you back into their life. It takes time for people to process things and you need to fine with that. At least when you talk to your friend, you will not feel regret that you have still not apologized to them.
Mean It When You Apologize
If you want to know the secret to making up with a friend that you hurt then you need to mean it when you apologize. Your friend will be able to see it in your eyes when you are truly sorry. So, only apologize if you mean it or else it might backfire.