Volcanoes are places where the plates of the Earth's surface have cracks in them, so that the very hot melted rocks that are under the tectonic plates bubble up to the surface. The hot melted rocks are called magma. The magma is under a lot of pressure inside the Earth's plates, so when it gets a chance to let off some of that pressure by shooting out into the air, it does just that. There are volcanoes on other planets, too.
Probably in the early years just after the planet Earth formed, about four and a half billion years ago, there were a lot more volcanoes than there are now, and they erupted more frequently. It may be that the heat from these volcanoes was what warmed up the water in the oceans so that it melted and got warm enough to make proteins into proteinoids, part of the beginning of life on Earth. Volcanoes also may be the thing that created land, by shooting up rocks into the ocean that covered the whole Earth, and then piling those rocks up, eruption after eruption, until the tops of the piles stuck out of the water and became islands.
While volcanoes are very dangerous to people when they are erupting, after the eruption volcanoes still bring many useful things to plants and animals. The magma that shoots out of the volcanoes cools into different kinds of igneous and metamorphic rocks like lava, quartz, pumice, granite, and basalt, and when these rocks wear down and become dirt it is very rich dirt that is good for growing plants. The obsidian, or volcanic glass, made good sharp tools for Neolithic farmers, and even today doctors still use obsidian for knives for operations.