You can remember the meaning of 证人 with this easy mnemonic:
We need proof (证) that you were at home when this crime happened. We need that man (人) in the security guard room as witness that you came back
Using mnemonics to remember the meaning of Chinese characters like can have an enormous impact on how long to learn Mandarin it takes.