A witness is someone who sees something happen. They are often used in court to help find the truth. During a trial, the two lawyers will bring in witnesses to help back up their arguments.
In a criminal trial, the prosecution lawyer will often bring in the victim of the crime to say what happened, and anyone else who can prove the accused person did the crime. The defense lawyer will nearly always call up the accused person to explain why they are not guilty, and bring in other witnesses who can prove the accused person is not guilty. Each time a lawyer brings in a witness, the other lawyer will cross examine the witness - they will ask them questions to make sure they are telling the truth.