A deposition is a statement taken under oath. The witness has a lawyer, and the opposing lawyer asks questions. There is a court reporter who writes everything down. Lasting from an hour to several hours, with breaks, it takes place in a conference room, not a court.
The written statement can be used as evidence at trial. Its most common use, however, is by the lawyers and insurance company, who use it to form conclusions about settling the claim.
It is common to take depositions of an accident victim and the people who are being sued. If a witness is expected to testify to something that is extremely important, that it is mandatory to take the deposition of that witness.
Depositions are the most expensive proceedings, other than the trial itself. A deposition may involve travel, compensating a witness for loss of income, and always requires payment to the court reporter. A technical deposition (i.e., a statement from a doctor or other expert witness) may cost as much as $1,500.00 per day just for the court reporter. A lay witness deposition might cost half of that.
Every state has rules concerning the "who, what, when, where and how" of depositions. For example, in California a deposition has to take place either within 75 miles of the deponent's residence, or within the county where the action is pending and within 150 miles of the deponent's residence.