Africa is the second largest continent, with 54 countries and a surface area of 30,244,050 km sq.
Many locals hitchhike in countries throughout Africa, often paying a small fee to the driver. It is best to check the political and social climate of each region before traveling.
In the whole of Africa it is possible to flag down cars pay them a required fee and get a lift in return. That is just the way public transport works in that part of the world -who has a means of transportation, that is a car is automatically expected to give lifts to others and of course charge them a small amount of money for the favour. The idea of it has nothing to do with our Western idea of hitchhiking.
If you are of European descent it may sometimes work that by waiting alongside a road where bush taxis also go that you can stop a NGO driver, tourists or someone rich in their mercedes and thereby go quicker and free of charge, but there are so little of these around that this is not something you can usually bank on.