The very first step to fix your past mistakes is to accept the mistake. Once you can understand what has happened, moving on becomes easier. You need to next take responsibility for committing the mistake and apologize to the people to whom you might have caused pain to. You need to then start working on yourself by altering your behavior and thoughts to not repeat the same past mistake you made.