To testify, also known as to give evidence, is to answer questions as a witness in court.
In normal circumstances, the party calling a witness to testify will initially perform a direct examination before the opposing side has a chance to cross-examine. The initial side will then have a chance to re-direct on any matters raised during the cross-examination. All testimony in court is given under oath which means charges of perjury will apply to any deliberate lies told.
Normally a witness can only be asked about what they know about an event; that is what they themselves directly saw or heard. Only a properly qualified expert witness may be asked their opinion about their evidence, or to draw an inference from the available facts.