In law, a settlement is a resolution between disputing parties about a legal case, reached either before or after court action begins. The term "settlement" also has other meanings in the context of law.
A settlement, as well as dealing with the dispute between the parties is a contract between those parties, and is one possible (and common) result when parties sue (or contemplate so doing) each other in civil proceedings. The plaintiff(s) and defendant(s) identified in the lawsuit can end the dispute between themselves without a trial.
The contract is based upon the bargain that a party foregoes its ability to sue (if it has not sued already), or to continue with the claim (if the plaintiff has sued), in return for the certainty written into the settlement. The courts will enforce the settlement: if it is breached, the party in default could be sued for breach of that contract. In some jurisdictions, the party in default could also face the original action being restored.