as the sand is loose if vegetation, amount and type of sand. sand is loose and will migrate (move), due to the wind. sand dunes mostly form when there is an obstacle, the sand builds around the obstacle. eg, vegetation.
i know this sounds like some next up complicated thing which you probably don't understand (because i didn't), but it basically means when the wind makes the sand move over obstacles aka vegetation.