Margarine is an imitation butter spread used for spreading, baking, and cooking. Margarine is made mainly of refined vegetable oil and water, and may also contain milk (Wikipedia, nd).
Just because margarine is not actual butter does not make it automatically safe for consumption. Some margarine may still contain milk protein or other allergen concerns. Stick by the general rule of “do not assume that the name describes the product’s contents” (Top Smart Nutrition, nd).
Margarine can be used for spreading, baking, and cooking. It is also commonly used as an ingredient in other food products, such as pastries and cookies, for its wide range of functionalities (Wikipedia, nd).