Margarine has been around for decades as a low cost and sometimes lower fat alternative to butter. It not the same as butter, though, and the differences could sabotage your recipes if you're not careful.Understanding MargarineMargarine is used extensively as a substitute for butter. For some applications, it's even more popular than butter. Because it has a buttery taste and texture, it's easy to forget that on a molecular level, margarine is different from butter, though:Margarine is a vegetable fat, not an animal fat. It exhibits different behavior in cooking. (More on that in a minute.)Some margarines on the market include milk or animal fats in their recipes, so they can still create problems for vegans or people who are lactose intolerant. Know what you're buying by reading margarine labels carefully.Hard variety margarines are made with partially hydrogenated fats. Hydrogenation has received a lot of press in recent years because it may contribute to health problems like increased risk for cancer. It also lowers good cholesterol (HDL) in the body and raises levels of bad cholesterol (LDL).Fats that have been partially hydrogenated are commonly referred to as trans fats. The science is complex, but partial hydrogenation itself is designed to modify fats to make them shelf stable for longer periods of time. This means they won't go rancid on grocery store shelves. Trans fats are uncommon in nature, but they occur very frequently in processed foods like cookies, packaged dinner mixes and margarine.That's not the only way margarine differs from butter:Margarine contains water. When used as a room temperature spread, there usually isn't a problem. If you're making a pie crust and opt to use margarine instead of butter, you could end up with a soggy bottomed pie.In cookie making, that picture of a chubby chocolate chip cookie on the box could turn out like a flat pancake running all over the cookie sheet when you use margarine instead of butter, especially when the recipe calls for butter. If you like the idea of using margarine in baking, stick with a variety that remains firm at room temperature. It will typically have the lowest water content.Margarine burns easily, too. It's true that using butter, especially in sautéing, can lead to burning mishaps, but that's more likely to happen with margarine.Margarine has its uses. It's convenient and inexpensive. In moderation, it can be an effective butter substitute in Sandwiches and melted on vegetables. Use some caution before you use it as a substitute for butter in a recipe, though.