If you come to an agreement with the defendant before the trial, then you do not have to go to court. Most civil cases, including personal injury lawsuits, do not reach the court as a trial.
The agreement between you and the defendant is called a settlement. Settlements can take place before and after you have filed your lawsuit. Generally, the defendant will make a settlement offer to avoid a trial. There are many reasons to do this. One of them is the amount of money it takes to go to trial, which includes attorneys’ fees and court costs. Another is that civil suits are often open to the public.
There are many reasons to accept a settlement offer. One of them is that there is no risk of losing at trial. Another is that you may need money quickly, and cannot afford to wait until after a trial.
Sometimes, a defendant will not offer a settlement. In this case, it is up to you to decide whether to proceed with a trial.
If the case continues, the judge will most likely require your presence as the plaintiff. There are a few exceptions, of course. For example, a plaintiff in a comatose condition is generally not expected to be present in court during litigation. There are other exceptions, and the best thing to do would be to ask the attorney you hired to handle your lawsuit.