Africa is a complex and diverse continent, with hundreds of languages and dialects, almost every ecosystem on Earth, and the world's largest desert separating major populations. So there is no easy way to summarize how Africans resisted the colonial powers that carved her up for the better part of four centuries. If I had to categorize them, I would say African resisted colonial rule in some cases violently, in some cases non-violently, and in still other instances used passive resistance.
Violent Resistance - There are numerous examples of this, but the Algerian revolt against France in the 1960s, the revolts of the Zulu in South Africa (see Battle of Islandlwana) and Mau Mau in kenya against British rule, among many others.
Non-violent Resistance - In the Year of African Independence, 1961, 17 countries declared themselves independent of colonial powers, most of them non-violently, through protest and/or negotiation.
Passive Resistance - This method was very common over the centuries that European powers ran most of Africa, and involved working more slowly, sabatoging services such as rail lines, or keeping tribal languages alive in villages and schools.