The smell of rotten eggs comes from hydrogen sulphide, which volcanoes release when they erupt. Volcanoes also release other gases, such as water vapour, sulphur dioxide and carbon dioxide.
The sulphur often precipitates as yellow crystals on nearby rocks. The gases can also react with water to form sulphuric acid, which breaks down black basaltic rocks into red or yellow clay.