Volcanic eruptions can inject large amounts of gases, aerosols, and ash into the atmosphere. This can lead to short-term cooling due to the reflection of sunlight by aerosols and sulfur dioxide converting to sulfate aerosols, which can persist in the stratosphere for months to years. However, the long-term impact depends on the magnitude and frequency of eruptions. Major eruptions can cause significant cooling, while frequent smaller eruptions may have a more localized and temporary effect. Additionally, volcanic gases like carbon dioxide and sulfur dioxide can contribute to the greenhouse effect and acid rain, respectively, which can have long-term implications for climate and ecosystems.