I'll touch on a few points. Some volcanoes are divided into hazards zones. Some areas on the volcano are too hazards to build or live on. They still might be used for ranching or farming. They leave the area during the eruption and return later to reclaim the land.
Some people build structures to reduce the hazard associated with living on volcanoes.
For example, dams can reduce the damage caused by lahars. Barriers can be constructed to divert lava flows. Some students in Japan even wear helmets on their way to school to protect them from material blown from volcanoes.