The Sahara Desert has a one of the most unique landscapes in the whole world. Have you ever wondered what lies beneath those dunes of sand that stretch for many miles?
The following two answers have the most recommended explanations on the internet to this question. The first answer gives a more in-depth understanding.
The Sahara, contrary to popular belief, is mostly not covered in sand dunes. Here’s a map of all the dune fields (in yellow) in the Sahara. Most of the Sahara looks something like this– a rock-strewn sandy soil with a hard crust (“desert pavement”), like what you see in the Mars rover photos but with scattered bushes. The dunes covered places that look like that, so imagine a rocky soil a few meters thick at the bottom of the dunes.
Then the groundwater level is usually somewhere above the old ground level, so imagine that it’s soaking wet and muddy. That’s what it’s like down there. The dunes are not like glaciers- they don’t rub rock formations smooth once they’re buried. They mostly preserve it whole. (For an extreme example of this, see the camel thorn trees of Namibia which were buried centuries ago and only recently uncovered as the dune kept migrating.)
Another thing to consider is where all that sand came from. You get sand dunes when the environment is producing more new sand grains faster than it can stabilize them into rock. The Sahara has so many dune fields because when the climate was wetter about 6000-10000 years ago, there were massive lakes covering what is now desert.
When these lakes dried up, their sandy bottoms provided an ample source of sand to make dunes (and an ample source of nutrients in the form of wind blown dust to feed the Amazon rainforest). Here’s a map (snipped from this paper) of all the huge lakes and alluvial fans (in blue and gray) that used to cover the Sahara. Notice how many of them are in the same parts of the desert that now have dune fields in that earlier image? In many places, the current dunes are directly over the old lake bed, so the bottom of the dunes is exactly what you would imagine a dried up lake to be like.
See this radar image. The top of the gray bar is the top of the dunes, and the red line is the bottom. It’s so flat because it’s an old lake bed. There probably aren’t mountain ranges or other huge topographical features buried under the sand.
Apply enough pressure to sand and you’re getting packed sand that behaves as a very brittle rock. Apply more, you get sandstone. Apply even more pressure and you’re getting harder sandstone, closer to granite, Pile up enough sand and the sand on the bottom gets that pressure. So instead of a “bowl filled with sand”, a desert is a set of strata of sand/sandstone of different hardness.
Tectonics, wind, erosion mix that up; expose hardened rock, break it up into gravel, pile sand up creating mountainous dunes that get rocky core then blow the loose sand away; shifting plates lift deeper layers onto the surface, so things aren’t smooth and uniform, “same depth – same hardness”, but more chaotic – but you can be pretty damn sure 500m down it’s all solid rock.