Margarine is a highly processed food made by combining water and vegetable oils and usually containing emulsifiers, preservatives, additives, artificial colourings and flavourings and salt. There are many types available using different fats and with differing flavours and uses. Some are purely vegetable-based, containing no animal products at all, and are labelled dairy-free or vegan. Others contain a mixture of animal and vegetable fats.
Butter substitutes such as margarine and 'non-dairy spreads' vary in fat content, water content and flavour. 'Hard' margarine has the same fat content as butter, so is the best 'substitute' for butter - although your baked goods won't taste the same. Because it has the same fat content as butter, it isn't a low-fat option. Low-fat spreads cannot be used as butter substitutes in cooking.