The ways to prevent soil erosion are:
(1) Planting more and more trees. The roots of the trees will fix the soil by holding a huge amount of it. Thus, preventing soil erosion.
(2) In hilly and mountaneous areas, terrace farming should be practiced. When we cut the hills in the form of terraces then this prevent the soil from being eroded by going downwards.