I believe that a the word sorry means nothing unless the other person knows that you understand how you have offended them.
The best way to say you are sorry is to tell the person you offended that what you did or said was (wrong, insensitive, mean, unthoughtful, etc.) and explain with your heart that you understand it was wrong and ask their forgiveness.
Almost everyone will be forgiving if they know you recognize you were out of line and communicate a sorrow for hurting them. When I say almost, you must know there are those who choose to be bitter or like to hold a grudge. Nothing works with this type of person.