I understand this big time. As seen in this post on Meta Stack Exchange
Why don't we keep public records of suspensions?, which is interestingly my top voted network question outside of Stack Overflow Meta.
In my case I was upsetting multiple individuals, but the same principles still apply. I still get off on the wrong foot with people from time to time. Some personalities are more difficult to manage (in this case mine) and so an extra effort needs to be made when communicating with people, so that our messages are not misconstrued online.
1. Acknowledge It
I work on the principle of "own it". If I've made a mistake I own it. It can feel a little humiliating, but that's not a bad thing, as we should be embarrassed by our own bad behaviour - whatever the reason for it. It's important to acknowledge to the person that you can see what was wrong with your behaviour.
Acknowledging one's own shortcomings is really the best strength anyone can have. As by knowing where we need improvement, we are able to improve ourselves.
It's like taking a car to the repair shop, when you think it's running fine. Not knowing if or what the problem is or where it is, means it's unlikely to be fixed. (may not be the best example as some things are obvious to a mechanic - but I hope you get my drift)
By sharing your acknowledgement of the situation, you are telling the person, hey, I know I behaved badly, and you could think I was immature or a troll. This feedback is important as it shows the other person you have self awareness and are capable of change.
Simply, apologise for any distress or harm you may have caused by your behaviour. This is a demonstration that you are aware of how your behaviour impacted the other person. It displays empathy and shows that you are not only concerned with yourself, wanting the person to respect or like you, because it makes you feel good. You want the person to actually feel better.
3. Change Your Behaviour
This is obvious, but crucial. There's no point to apologise and then continue with the behaviour. It will render the apology, more or less, worthless. As it's akin to saying, I know I harmed or distressed you in some way and I'm still doing it.
There may be hiccups. By this I mean milder forms of the behaviour in a slip up. People can react in a couple of ways to backsliding. They may be oversensitive and overreact to it, or they may be pleased that they can see an active improvement. Either way, keep house cleaning and follow the process of acknowledgement and apology if you stumble. Slip ups are hard to deal with, for both you and the other person, but we are only human.
4. Be Patient
These things take time, for tensions to dissolve and the new and improved interactions between you and the other person to overwrite the person's experience of you. If the bulk of the experience has been negative, it will take time of being positive for the person to let their guard down and relax enough to trust that you have changed and the other was an aberration or an immaturity and you have indeed matured.
This can be difficult, knowing the person may not like you, and knowing you have to wait. Sometimes it's better to take a low profile for a while. Then gradually increase your activity, with the changed behaviour. Changing our behaviour is one of the most challenging things we can do. Tensions between people, puts pressure on you, so it's good to be mindful and pace yourself.
Interestingly, I have formed good relationships, where, previously, I was difficult and I've found people on this site to be forgiving. I suspect that's the nature of this site and the type of people it attracts. People who want to contribute and improve the world, in this internet environment, that strives maintains a Be Nice policy.
5. Forgive Yourself
With all this focus on shortcomings, it's important to also be kind to yourself and forgive yourself for making mistakes. People who are introspective, can sometimes be too self critical and just as we should be nice to others, we should try and be nice to ourselves.