Unfortunately, we do not allow "throughout history" questions in this sub. But I won't leave you without an answer.
In modern history, the textbook example is the Malayan Emergency (1948-1960) in which the British armed forces managed to combat a communist insurgency. This is seen as the most clear cut success ever of counterinsurgency in action. I've written this post regarding counterinsurgency which you might find enlightening.