Some important differences, as I understand it:
- polyunsaturated fats are the category that includes omega 6 and omega 3 fatty acids. Even further, omega 3's can be ALA (from plants) or DHA (e.g. salmon) variety. Omega 3's and in particular DHA have been shown to have anti-inflammatory and other health properties. Which is to say even within polyunsaturated fats there is a wide variety of alleged health effects, but when talking about cooking oils and processed foods we're almost certainly talking about other types than the type known to have health benefits.
- polyunsaturated fats can be hydrogenated which makes them solid at room temperature. So replacing butter with margarine typically means these types of fats. It was discovered relatively recently that trans fats (which are often the by-products of this) are almost certainly bad for you.
- polyunsaturated fats are the least stable, meaning they're more likely to break down into things that are probably not good for you (e.g. if deep frying with them).
- highly-processed foods tend to be high in polyunsaturated fats, and omega 6's in particular. This is the same category regular vegetable oil (e.g. soybean oil) falls in.
- olive oil is high in monounsaturated fat, is generally thought to be pretty healthy, and it doesn't have these same kinds of "gotchas" that polyunsaturated fats can. Historically the main reasons we think olive oil is healthy are that populations with less heart disease (e.g. Mediterranean populations) eat a lot of it, I don't know how much more recent research there is actually proving causation here.
- saturated fat is the other type, which can occur in plants like coconuts (healthy) or in butter, fatty meats like bacon and steak, etc. The history here is pretty fascinating, but through lots of misplaced assumptions of correlation/causation these are traditionally viewed as unhealthy (thus why people are doing these studies like replacing butter with other fats). AFAIU this debate is still ongoing, there is some evidence these really do raise your cholesterol but also some evidence that the particular kinds of cholesterol they raise aren't necessarily bad, in otherwise healthy people. I'm a bit unclear of this aspect.
I've concluded for me personally, this stuff is still so unknown that your best bet is just to keep your total calories under control and not worry about types of fat, with the exception of not eating any trans fats and prioritizing fatty fish if you can.