Where did the sand in the Sahara come from?
The sand IS the original dirt, or at least what's left of it.
Sand is one of the major constituents of soil. Soils are roughly half minerals by volume and those minerals are silt, sand, and clay. In fact sand is often the largest single constituent of most common soils. Silt and clay are smaller and lighter, and can be moved by wind much easier when dry, this leads to the removal of everything but the heavier sand particles in very dry conditions.   What has happened is that without water and life to bind the material together, wind has removed all the lighter particles leaving nothing but sand and pebbles. Wind is good at sorting grains by size so each area tends to only have one grains size.
Where it came from originally
. Sand is just weathered rock, if you look at a map of the sahara there are quite a few scattered mountains and highlands in the desert. That is where the sand (and the original silt and clay) came from originally, weathering of rock, and the sahara is mostly exposed rock, with sand only making up a minority of its surface.
I suggest the wiki for getting started on soil science, if you are interested, https://en.wikipedia.org/wiki/Soil
More on what sand is, http://www.sandatlas.org/sand/
More on wind driven sorting, https://people.ucsc.edu/~jzachos/migrated/eart120/lectures_08/LECT7B.pdf