Need advice. When someone disrespects you/does you wrong, do you walk away from the situation and move on or do you confront the situation?

Keep in mind the person you are confronting may or may not care as to how/why they hurt you.

I’m trying to decide between sticking my head up and walking away or standing my ground and let the person know that I am not to be disrespected.