In the age of imperialism, Britain, Spain and France had gained a clear advantage with colonies in Africa and South America, and they had control of some of the more choice parts of those continents. These three countries' access to seas made it easier for them to set up and maintain colonies. Germany, however, was left to fight for the few territories remaining that had strategic or resource value.
Imperialism is the expansion of a nation's territory or resources through taking over weaker countries. After the Industrial Revolution, developed nations that were more limited in their natural resources had to look outward. They found the resources needed in Africa. Imperialism was rationalized by the idea that lands should be occupied and controlled by the most productive people, who are those best suited to do the work.
Many African nations were tricked by European nations into signing treaties, presented as trade agreements, that contained clauses signing away their rights to government and monetary gains. When Africans discovered they had been duped, leaders organized military resistance that spread throughout Africa.
Eventually, despite large-scale resistance organized by governments and small-scale guerrilla warfare, African resistance gave way to the technologically advanced European powers. Most of Africa had been colonized by 1900.