Everthing new starts by understanding the basics. One of the basic ingredients used in food is butter. This one-page infographic should help you understand all the science basics when it comes to butter.
Just a heads up, I’m based in Europe so the composition of butter I mention is the European law. Details might be different in other countries, but the general idea is the same :-).
Butter is made from milk and as you can see consists of mostly fat and water as well as some proteins. Butter is used a lot in baking, as are margaring and shortening. Butter though is fundamentally different from margarine and shortening since those two aren’t made from milk. Besides that, there are some other differences in the fat composition which causes them to have slightly different properties. Therefore, they might be firmer or softer in the fridge or at room temperature than butter.