In 1500 AD, most of the people in Africa worshipped traditional local gods. But local gods are appropriate for local chiefs; big empires tend to go with monotheistic religions. So as more of Africa formed into empires, more and more people became Muslims, who followed Islam instead, or in addition to, their traditional gods. Most people in North Africa, from Morocco to Egypt, were Muslim. Most of the people along the coast of East Africa were Muslim.
In West Africa, also, a lot of people were Muslim, though here people were more likely to still worship their traditional gods alongside their Islamic faith. A smaller number of people were Christians, especially in Ethiopia and Eretria, which were Christian countries, and in Egypt, where the Coptic Christians formed a pretty big group. Finally, there were ancient Jewish communities in Ethiopia and all across North Africa, especially in Cairo. But the Jewish population had just gotten much bigger. Ferdinand and Isabella, in Spain, had just thrown out their entire Jewish population in 1492, and tens of thousands of Jews had moved to North Africa, which welcomed the Jews and let them settle down in Tunis, Cairo and other cities.
The 1600s saw a lot of religious wars in Africa, as in Europe. The Fulani, in particular, were determined to conquer all across the continent, from West Africa across Nigeria, Chad, and Sudan, and they used a radical, demanding form of Islam as a way to gain followers and as a way to enforce their power.
In the 1800s, as European administrators began to establish their own government systems all over Africa, and hired thousands of local people to run those governments, they often insisted that government workers should also become Christians. Christianity began to spread as a way of getting ahead for Africans and because Christian missionaries in Africa were often very good, helpful people who seemed like good role models. Christians ran most of the schools where African children could learn to read and write English, so you had to become Christian in order to get a good education there.
In the 1900s, despite the collapse of European power in Africa, the religious map hasn’t changed that much. North Africa is still largely Muslim; even more than before, because almost all of the African Jews moved to Israel in the 1950s. East Africa and West Africa, too, remain mostly Muslim. Ethiopia and Eretria remain Christian, as they have traditionally been. In South and Central Africa, however, many people are now Christians, and Christianity makes more converts every day.