There are at least two main ways in which people or nations have tried to overthrow foreign countries that have ruled them. These two ways are violence/military action and protests/persuasion. A colonized country can use one or both of these methods to try to gain their independence.
In the United States, for example, both were used, but military action was more important than protests. After the British government started to impose taxes on the colonists, there were many protests. The colonists tried to persuade the British to give them more autonomy. However, because the British did not agree to these requests, the colonists ended up fighting a war against the mother country. It was in this way that they were able to gain their independence. Similar things happened in Latin America to allow those countries to become independent from Spain.
In other situations, violence has been less important. A major example of this is India. In the history of British rule over India there were, of course, incidents of violent attempts to overthrow British rule. However, in the end, it was protest and persuasion (along with WWII) that actually brought about Indian independence. It was Congress’s program of protest and persuasion, rather than a violent rebellion, that overthrew British rule.
Thus, violence and persuasion/protest are the two main ways in which a nation might attempt to overthrow a foreign country that rules it.