It literally means "to catch with time," implying that you caught someone doing something wrong at the exact moment they were doing it.
Here are some examples:
* "Lo cojí con vez robando el dinero." (I caught him red-handed stealing the money.)
* "La cojí con vez mintiendo a su jefe." (I caught her in the act of lying to her boss.)
Important Note: While the phrase is commonly used, it can be considered informal or even vulgar in some contexts.
