Both types of fiber are important to keep your body healthy. For example, fiber helps prevent heart disease by getting rid of excess fats in the intestine. It also helps prevent constipation by pushing food through the intestines.