The distinct areas of black sand on some San Francisco beaches, such as Ocean Beach and Funston Beach, are mostly iron-rich magnetite crystals.
The major source of this black magnetite is the granite rocks of the Sierra Nevada mountains where tiny grains break away through erosion and are carried to the ocean by rivers and deposited on San Francisco beaches by wave action and sea currents.
The magnetite has a different grain size and density to the more familiar yellow and clear silica-rich sand and tends to settle as a layer or band of black sand, which people sometimes assume is dirt or oil contamination. The amount of black sand visible varies through the year, depending on weather systems, currents and wave energy.
An interesting property of magnetite is its magnetic attraction, enabling it to be separated from regular sand using a magnet, and the reason it is sometimes called magnetic sand.