Buses run to Erfoud from the west (via Marrakech, Ouarzazate, Boumalne, and Tenerhir) and north (via Er Rashidia, Meknes, and Fez).
Erfoud is the port of entry to the '''Saharan dunes''' via Rissani and Merzouga. Expect to find many, many people offering to take you to Merzouga in 4x4s, so it's best to arrive with a plan in mind and knowing specifically where you'd like to go.