I would assume that the population part is due to Western Europe being very fertile land, whilst the nearby African countries make up the Saharan Desert.
Europe and the various groups of people who have lived there have long been at war and working to increase their might against one another. As major powers, they all were quite well-adapted to colonizing other countries. This is where Africa comes in.
Africa has always had a great assortment of tribes and kingdoms living on the continent. The Ghanian Empire is one example. However, Europeans saw the great wealth some of these areas had, and moved in to colonize the entire continent in the late nineteenth century. Only Ethiopia and Liberia maintained independence. The European powers agreed to cut up Africa into several different colonies that each respective European power controlled. For the most part, these boundaries stayed the same until the colonies achieved independence some years later.
To make a long story short, Europeans had been fighting each other for a long time and essentially mastered warfare and travel/trade. They created Africa's current country borders; Africans had little to nothing to do with their current borders. This is part of why Africa is plagued by conflict today, unfortunately.