A deposition is a statement made in court. A deposition can be made outside of court, too — after a crime, a witness might give a deposition. Then that written or recorded deposition can be used as evidence in the courtroom.
The word deposition is often used in a legal context, but a deposition can also be more like a deposit, as in the deposition of sediment on the bottom of a lake. And in the sense of depose, a deposition can refer to getting rid of a person of authority. The deposition of a king is the same thing as a dethronement. Deposition is a busy word, but it’s most often used in court.