Metaphorically, it is used to acknowledge that a witty remark of the other person was a spot-on, i.e. it was a great counterpoint and they are rendered speechless.
A: I have never forget anything!
B: Did you already forget how you forgot your keys yesterday?
A: Oh, yeah. Touché.
Mind the pronunciation of touché, too.