As most of the part of Western Sahara is under the control of Morocco, you can realize your intended trip to Western Sahara by obtaining an appropriate Morocco visa. Foreigners can visit Western Sahara for the duration of the permitted stay. For further information about Morocco visas, you can visit Morocco Visa Policy. The main requirement of entering Western Sahara is possessing a valid passport. At checkpoints, your passport can be checked by officers. However, you will not get any stamp for this process. This procedure is merely for the purpose of safety and security. In order to visit Western Sahara, you can fly from Morocco cities (Casablanca or Agadir).
When it comes to the remaining part of the Sahara which is under the control of the Sahrawi Arab Democratic Republic, that area is not open for any visitors.
Generally, visiting Western Sahara is considered to be safe, especially Erg Chebbi dunes, near Merzouga. However, it is recommended to check for the latest information on safety.
You can fly or use a bus, car, train, and boat to travel to Western Sahara. However, please, be sure that you have done all arrangements if you go there by car.
Yes, it is possible. You can fly from Canary Islands (Spanish).