The easiest and most economical way to reach Africa from anywhere in the West is to fly, though it's surprisingly easy to reach the north of the continent by boat. So how you choose to travel to Africa on your backpacking adventure will depend on where your itinerary starts.
You can fly into most African countries, and although air fares are often expensive, more popular tourist destinations, especially those rife with beach resorts like Egypt, are served by cheaper and budget airlines. Sometimes it can work out more cheaply to get a budget flight into one of these countries and than travel on overland to your ultimate destination.
There's also a strange trick to getting cheaper air fare whereby flying to an African country directly from its former colonial ruler will cost less than flying from elsewhere. So, for example, flying from London to a former British colony will be cheaper than flying there from France.
Also worthy of note is that less-developed African countries may only have a handful of flights each day or even each week. This means that flying into countries like Togo or Malawi can prove difficult.
If you're already in certain areas of southern Europe, reaching Africa by boat is quite an affordable option, and doesn't take as long as you might think. Ferries cross from Spain to Gibraltar several times a day, and similarly ferries between Italy and Tunisia. There are also ferries that run between France/Spain and Algeria.
These give you the option of bringing a car with you.
There is only one land connection between Africa and another continent, the Isthmus of Suez, which goes through Egypt. This allows drivers to enter Africa from the Middle East. Many who access Africa this way travel through Jordan and take a short car ferry to Egypt in order to avoid driving through Israel. Sudan and Libya, which border Egypt, will deny entry to anyone with Israeli stamps on their passport, which limits your onward travel options.