First of all, reflect on the hurt you have caused and ensure you have learned how to avoid doing this again. Consider how you let it happen. Were you too impulsive, poor at choosing your words, or acting on a wrong assumption?
Go to the hurt person and immediately accept that you are at fault. do show that you have realised how your words or actions have hurt that person, and display your wish to apologise. show that you have thought sincerely about the incident and have vowed not to let it happen again.