The first is the fatty acid profile, i.e. the relative quantities of fatty acids.
It is best when the most abundant fatty acid is oleic acid. This is true for olive oil and avocado oil and for certain varieties of other oils which are claimed to be "high oleic", e.g. high oleic sunflower oil.
For the oils with high percentage of saturated fatty acids, it is better to have little palmitic acid and more of either longer fatty acids, i.e. stearic acid like in cocoa butter or shorter fatty acids, like lauric acid in coconut oil.
Besides the fatty acid profile, some oils are known to contain other substances with favorable influences. This is known with reasonable certainty only for extra virgin olive oil, which is good for preventing cardiovascular diseases but it is not known which exactly is the substance with the good effect.
And third, there are oils which may contain other substances with bad effects, as shown here for the soybean oil or as is the case for the traditional rapeseed oil with erucic acid. Such oils must be avoided, at least until the undesirable substance is identified precisely and its removal from the oil becomes possible.