To dream that you are apologizing to someone refers to your desire for harmony and truth in your waking life. Perhaps you are feeling guilty about something. Or the dream is a way for your subconscious to alert you to some wrongdoing that you are responsible for. Alternatively, an apology symbolises forgiveness. You need to let go of some grudge.
To dream that someone is apologizing to you implies that you feel mistreated or wronged. Consider the significance of who is apologizing to you. Perhaps you feel you have betrayed an aspect of your own character.