Margarine is a healthier alternative to butter because it is lower in saturated fat and made from plant oils.
Early margarines contained trans fats, which are more harmful than saturated fats. Modern research shows butter's saturated fat impact is less severe than once believed, and it contains beneficial compounds. Most modern margarines have reduced trans fats, but whole foods like butter are often preferable to processed alternatives.