Compromising in a criminal matter is called compounding of offence. Suppose you are an accused in a cheating case under section 420 IPC. In such a case, you can compromise the matter with the person so cheated.
This is legally permissible under section 320 Cr.P.C. wherein various offences under Indian Penal Code can be compounded.
However, all offences are not compoundable. Only the offences mentioned in section 320(1) can be compounded by the persons mentioned therein. Section 320(2) mention the offences which can be compounded only with the permission of the court before whom the case is pending.
The compounding of an offence in this manner has the effect of the acquittal of the accused. For closing the case against you, you have to file an application before the Court, where the case is being tried, mentioning therein that you have compromised the matter with the affected person.
It is better if the affected person also files his affidavit alongwith this petition that he has compromised the matter with you and that he has no objection if the FIR and the criminal proceedings against you are quashed.
If there is a written compromise, a copy of the same should also be filed alongwith the petition. The court ordinarily send/refer the case to the Lok Adalat for settlement and disposal, if the offence is compoundable. In practice, the people mostly file a Criminal Miscellaneous Main petition in the High Court under section 482 Cr.P.C for quashing of the FIR and for quashing of the criminal proceedings pending in the trial court.
The High Court, on recording the statements of both the parties, or after being satisfied in any other manner that no fruitful purpose would be served by continuing the proceedings against the accused, allows the petition and quashes the FIR and the criminal proceedings pending in the trial court.