Take for example your friend says "It's going to rain today" and you tell him it is impossible because the weather is so sunny. If rain happens to fall on that day, your friend will say " In your face".
Basically, it is used when two people have different opinions on something and when one of them turns out to be right, he can say "in your face" because he was right all along and the other person turned out to be wrong.