Every man in India must understand the way criminal trials work in India, and the steps followed from beginning to end.
There are dozens of ill-drafted, ambiguous, biased and misandrist laws in India. The judicial system is extremely dysfunctional and the process is archaic and in many cases, broken. Only police and lawyers gain from the complexity and the delays, but knowledge is power. You should know what to expect, and then act in ways to minimize your troubles. Troubles will come your way no matter what, because the system is broken. But if you understand it, you will be able to navigate it better.
We want to emphasize that there is no way you can prevent or avoid a false case being slapped on you. You can be innocent, have tons of evidence in your favor, have audio or video recordings, not even be related to the woman, but still she can file a case on you and drag you through police stations and courts for decades.
Go through this two-page PDF (prepared by a law firm, Vaish Associates) and understand the basic definitions and the flow-chart.