There are a lot of different ways to apologize to someone. "I'm so sorry" is used in a few situations:
- When you want to apologize to someone you're not close friends with, for a mistake you made that was pretty bad but not horrible.
- When you want to apologize to a close fried for something really bad that you did.
- When you want to show your sympathy for something horrible that happened to a person you know, even if it wasn't your fault. For example, you say this when a member of someone's family dies.
You usually use "I'm so sorry" when you're talking to people you don't know very well. With people who are close friends or family, you say "I'm so sorry" only for really bad situations.