If you're crossing the Med at Gib (prob Algeciras if you're using commercial ferries) you'll be heading south taking the "atlantic route". That's shorthand for riding through Morocco and eventually following the only tarmac road that'll get you to the Western Sahara / Mauritania border. My first suggestion is to search here for "atlantic route" There's a lot of info on hotels / fuel etc that'll answer many of your questions. If you've got an hour or two to waste you can follow the road south on Google Earth and get an idea of what it's like.
It's about five days from the Med to the Mauri border if you don't hang around much for sightseeing. The area from around Tan Tan south is politically sensitive and although there are other roads that you can see on maps they're pretty much off limits at the moment. The route that hugs the coast is the one you'll be on.
The first time I overnighted in the desert is the first time I really
wished I had a reliable bike rather than a cheap one. Bear that in mind when it comes to choosing a bike. Fuel and water are available - about 250 miles is about the furthest you'll go between filling stations but having a 251 mile range leaves you with a problem when you arrive and they're out of fuel for the next week.
After Nouakchott the usual route is along the "route d'espoir", a 1500 mile road that ends at Nema. On a map Nema doesn't look that far from Tim - a bit of off road and you'll be there! If you're on your own and it's your first time in the region, don't do it. Go via Bamako and along the road that follows the Niger river, via Segou, Mopti etc. There have been a number of reports here recently saying that due to security concerns there are a lot of checkpoints along the route d'espoir. Find those and have a look through. Security is becoming a serious issue.
The Atlantic route is 1000+ miles of this
This is when you really need the bike to start the next morning
You'll have a few hundred miles of this on the way back from Bamako to Dakar (this is near Kayes)