I got you
Does it mean
Ok, I understood what you said
Hey, I know that you did that?
If they are both correct, when should we use which?
The meaning depends on the context. In (at least American) slang, saying "I got you" means either "I get what you're saying" or "I've got your back".
In child games of tag, saying "I got you!" means that you caught someone.
We need some context to be absolutely sure of the phrase, but it often means: "I understand what you're saying." The "got" has to do with "getting" understanding of the other person's words. So saying you "got" someone is short for saying you received what they were trying to convey.
More literally, it could be used to mean "I have hold of you" or "I touched you", but I'm not sure that applies in this case, because you felt the need to ask.
One meaning is the one "used to express satisfaction at having captured or defeated someone or uncovered their faults", also intended as not literal; You can see an example in The longest yard trailer. Look from the minute 1:32 to roughly 1:40.
The other ones are the ones that @drm65 and @simchona highlighted.
Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?