Logically, 'I got it' should mean 'I understand you'. But in many conversations I heard people say you got it and based on the context it seems they want to say 'I understood'.
I am confused when I should say either.
English Language Learners Stack Exchange is a question and answer site for speakers of other languages learning English. It only takes a minute to sign up.Sign up to join this community
I got it means "I understand", this is correct. It can also be an expression of success in certain situations - that you got a job, for example, or even just an abbreviation of "I have got it", which can mean the same as "I have it".
You got it as a question means "do you understand", but as a statement it's a response to a request, being asked to do something. It's an agreement to do whatever one has been asked to do - usually a particularly affirmative agreement.
You are correct "I got it" means: I understood
whereas "you got it" means something else completely (that I knew), I just had to check google to find out what it does mean: your request will be carried out.
Think of it as person 1 saying "can you get me a ball" and person 2 wants to show person 1 how keen and eager and quick they are replying "you got it" to say "it is like it has already been done".
This has already been answered over on English stack exchange