Why would there be desert in North Africa?
Orographic lifting, or wet air passing over mountains that gets cold and precipitates (snows/rains), so by the time it gets past the mountains the air is extremely dry.
In North America (typo, though this still applies to N.Africa!) , most deserts are caused by what's called "orographic uplift" which isn't nearly as scary as it sounds. I'll give an example but when I say "air", I want you to visualize a parcel of air.
Rain Shadow Deserts
When air passes through a mountainous region, it has to rise up to go over the mountains and past them. As the air parcel goes higher up, it cools down and the moisture it contains is precipitated out (rained/snowed out). By the time the parcel of air travels over and past the mountain, its moisture content is going to be very low because it just precipitated most of its moisture over the mountains. As a result, land on this side of a mountain is going to have very low moisture content, potentially leading to a desert.
Orographic lift can be a bit confusing so if you have any further questions about this, feel free to ask away. I hope this helps!
North Africa is under the descending part of the Hadley cell of the Northern Hemisphere.
To answer this we need to look at global circulation.
The atmosphere around the Equator is heated. Since a lot of the Equator is over ocean a lot of moisture will be injected into the atmosphere here. The heating of the atmosphere causes expansion, and the inject of water vapor causes a decrease in pressure, both of which cause the air to rise.
Rising air cools since the air pressure drops and a drop in pressure causes the temperature to drop also. This is Gay Lussac's law which says that for a constant volume pressure and temperature are directly proportional. The ability of dry air to hold water vapor is determined by the temperature. Shown on the graph below.
The red line indicates the amount of grams of water vapor per kilogram of air. You can see as the temperature drops the amount of water vapor drops off pretty rapidly. As a result the water vapor in the rising air condenses. This condensation is accompanied in a release of latent heat which is the heat that is stored in the water molecules in order to change state. That means as the vapor turns to liquid it releases air.
On the first diagram where we see the Hadley cell you can see as the air rises it moves north. This air, having had a lot of the water vapor condense, is warmer and drier. Since we already discussed that water vapor is lighter than dry air, the air is now heavier and it begins to sink. Since we have a higher temperature to start with, and sinking air does not pick up any humidity, the sinking air gets warmer than it was when it was at the Equator and much much drier. So around 30 degrees latitude, where the Hadley cell ends, we get a lot of dry air and consequently deserts around the world.
Take a look at the globe and see how many deserts are at 30 degrees latitude. The Sahara, the Thar the Chihuahuan, the Sororan , the Lut and the Gobi are all at or close to 30 degrees latitude. In the Southern Hemisphere we see similar results with the deserts of Southern Africa and Australia at 30 degrees latitude.
Rain shadow and orographic lift do cause local deserts, but the Hadley cells is what create large deserts.