There are 3 components involved in a proper apology.
1.) Acknowledgement - Communicating that you understand what you did was wrong/hurtful, why it was wrong/hurtful, and apologizing for contributing to/causing that wrongdoing and pain.
2.) Compensation - If what you did resulting in some form of loss or setback for the other, there needs to be some form of recompense to balance out the loss.
3.) Transparency - The person who was hurt needs to be able to trust that you won’t hurt them in a similar fashion in the future. You need offer them an explanation of why you did what you did, and what you’re going to do differently if a similar situation arises.
Sometimes acknowledgement (apology) is enough. But depending on just how sever the transgression is, sometimes people expect more than just an apology.