No one goes through life without making mistakes along the way. When we inevitably screw up, we apologize if we value the person we have hurt.
In first grade, I ran up to my mom in tears. Why? I had lied to her about cleaning my room. This was the first lie I had told her, and I apologized profusely. However, that was not a proper apology. When you say that you're sorry, you better damn well mean it. Saying sorry and asking someone for forgiveness implies that you won't do it again. After my little meltdown in the first grade, I'll admit, I definitely didn't stop telling little lies to my mom at least through middle school. I'd like to think I've learned since my first grade self. Apologize through continued actions and efforts as well as words.
Aside from meaning it, you have to understand that the person you are apologizing to may not accept it. If you're close, they will probably forgive you eventually, but give them time and space. You know you've done something wrong, allow time for them to process now. Don't assume you will be forgiven. Coming in late to work for three weeks in a row and then apologizing may not save you from being fired. Accept responsibility, but don't assume a simple "sorry" will make things better. In other words, don't use it as a way to try to get out of a consequence or punishment. You did the crime, so be prepared to do the time.
Apologize with sincerity. Try to understand where the other person is coming from and how they are feeling. You can only truly be sorry if you understand the damage or hurt you have caused. This can also be incredibly helpful in trying to make amends. Think about how you would be feeling in their shoes and what could make it better?
Bailing on plans is something most of us do. I've done it multiple times when I just really don't feel like getting out of bed. However, if we are ready to apologize and change that behavior, we should start by thinking about how our friends feel if we've constantly cancelled plans. They probably feel like you don't care enough about them to hang out or that you don't value their time. Apologize for flaking and tell them why you bailed. Assure them that you will make time for them and actually do it. You should make the plans next time.
Relationships of any kind take a lot of work. If you've spent years being friends with someone or being close with your mom, it's likely you've hurt their feelings or messed up somehow. However, they'll probably forgive you. You've been important in their lives for a while, so they know who you truly are. You're worth more than your mistakes. When you're starting new relationships, make sure that you think before you do. When you do inevitably mess up, ask for forgiveness and change your behavior. If you've done all that you can, what happens after that is up to them.