Civil disobedience is the active and public refusal to obey an unjust law. In doing so the government (or invader) is shown to be cruel and loses support. Of course civil disobedience is only effective if the disobedience is not violent. Otherwise those opposing the government may appear to be cruel. How does it work in practice?
The term civil disobedience was created by Henry David Thoreau who refused to pay taxes because of the American government’s invasion of Mexico and support of slavery. He was jailed for a short time, but brought attention to the government’s unjust actions. It did not actually stop slavery or the invasion, but it was a developing idea.
One of the most famous practitioners of civil disobedience was Mohandas Gandhi, of India, whose supporters ignored and defied the British government and courts. It was difficult for the Indian colonial government to operate when people would not work for them or pay taxes. Nothing the government could do stopped his civil disobedience campaign. What did stop it was the murder of several police officers by an angry mob. Those who use violence are not practising civil disobedience they are sabotaging it. However in the end his strict non-violence campaign started again and disciplined civil disobedience did force the British to give up trying to rule India.
In the United States it used to be illegal for a black-skinned person to be in places, from restaurants to beaches, reserved for white-skinned people only. In many very courageous acts of civil disobedience black people broke those laws. They were often beaten, jailed or even killed. Yet more black people (sometimes accompanied by white supporters) came and broke the same laws. Eventually there were too many people to arrest and those unjust laws were ended. Civil disobedience worked and forced an end to many of those unfair laws.
Some people have claimed that laws that require women to wear shirts, but not men are sexist laws. So as an act of civil disobedience they have broken those laws and been arrested. (Google: Gwen Jacobs of Guelph)
Civil disobedience is a powerful democratic political tool. However it requires great bravery and discipline to perform it. It also requires that thugs looking for an excuse for violent excitement be prevented from joining and taking advantage of the civil disobedience campaign. Violence is a revolt, not civil disobedience. If one wants a revolution, go challenge the PLA (People's Liberation Army).