Examination for discovery is an examination under oath. It is part of the civil court process.
If you are suing someone or if you are being sued you will likely attend an examination for discovery. It is not court. There is no judge or court official present and it takes place in an office rather than a courtroom. You will be there with your legal representation and the lawyer for the opposing party will ask you questions.
A reporter (stenographer) will take down the questions and the answers. You will later get a copy of the transcript to which you can review and correct any mistakes you made. Don’t go and stress yourself out if you make a few mistakes, in my experience everyone makes mistakes.
The most famous mistake at a examination for discovery (or deposition) was made by President Bill Clinton.