A witness, in legal terms, is considered to be an individual who was present when a crime was committed, and can thus provide firsthand testimony describing the crime in some fashion and thereby proving that it occurred. There are some exceptions to this, as there are some specialized kinds of witnesses who might not have firsthand knowledge of a crime, but the vast majority of witnesses fall under this definition. The kind of experience which a witness is assumed to have with regard to the committing of a crime is sensational experience, meaning that it must be directly linked to one of the five senses. This ensures that the witness’s experience is direct, as opposed to secondhand, as the witness must have seen, or heard, or touched, or otherwise directly experienced the evidence for the crime in some fashion, in order to be considered a witness.
Witnesses can be called up by either side in a trial, the prosecution or the defense. Obviously, witnesses called up by the prosecution are much more likely to provide evidence proving that the defendant did commit the crime, whereas witnesses called up by the defense are more likely to provide evidence that the defendant did not commit the crime. This is just a function of both sides of the trial creating a list of witnesses which serves its purposes within the trial. In general, there are many arguments against the validity of eye-witness testimony, as a witness can easily misremember what actually happened, as has been shown time and again through scientific studies.