The most important thing first: You can't remove the smell. If you are interested in reducing it to hopefully tollerable levels, and/or understand why this is so, read on.
This may seem very broad, but really, there are only very few strategies which you can try, and I will list them here. A word of warning: don't get your expectations too high. Only under some circumstances can you turn "terrible food" into "great food". In many cases, you have to settle for "acceptable food that's still somewhat off" or even "unsalvageable".
How does aroma work
There are molecules in your food which are volatile - they waft through the air. When you eat, they reach your palate and nose, and come into contact with receptor cells. The receptor cells send signals to the central nervous system, which processes that signal and gets activation of all kinds of brain nuclei, with one of the main results being that you realize "oh, this tastes/smells like X". There are thousands of different receptors, each responding to a single molecule, or a family of closely related molecules, and each food exudes hundreds of these perception-triggering molecules. The combination of them is what triggers the recognition of your food as smelling "of X". The reaction of the nervoius system is mostly triggered by the stimulus of the smell molecules docking onto the smell receptors, but it uses all other information avaliable to it - percepts from other senses (taste buds, visual stimuli, etc.), memories, emotional state, etc., to form its reaction and prioritize its "place" in your attention.
The job of the olfactory perception system is to discover new olfactory stimuli (aroma), react in a dose-dependent manner (it differentiates the spectrum between "it has a hint of sage" and "the sage taste is overpowering") and point your attention towards that information.
Note that our olfactory system is highly efficient - there are molecules which are detected at a concentration as low as a few parts per billion in the air - and that your brain doesn't respond linearly to the information provided. Some stimuli get more "air time" in your attention than others. This is especially devious when you hate a given aroma - your brain will concentrate your attention on even very small amounts of it.
The possible strategies
There are only a few places where you can hook into that process, with differing rate of success.
Reduce the concentration
If you can apply this strategy, you are most likely to get success in the sense of turning unpleasant food to pleasant. The prerequisite for such success is that the aroma was pleasant in the first place (so not the aversion case and not something like burnt food, these cases fall under the "nonlinear response" part of the background info) and that it is physically possible to change the concentration. But even in the aversion case and unpleasant smell case, it is frequently worth applying it if the unpleasant smell is moderate - it just won't be a complete success.
The strategy differs on the type of food you have. If the smelly ingredient is still present in distinct chunks in an otherwise stirrable or reordeable food (soups, stews, stir frys, some casseroles), you can just remove the chunks. Do take as many out as you can, even if you are left with zero of the original - chances are that even when the ingredient is completely gone, it will leave lots of its volatile molecules dissolved in the liquid phase of the food, or soaked into some of the other solids.
If you have a stirrable/reordeable dish and the ingredient cannot be removed because it is a liquid or a very fine powder, the way to reduce the concentration is to dilute with more of the same food. You have to make one ore more additional batches without the ingredient, and mix with the original batch. This is the most effective strategy, and has sometimes to be applied in addition to the "removing chunks" strategy for smelly ingredients.
If you cannot mix another batch into your food (e.g. you overdid the vanilla in a cake) or don't have the ingredients for another batch, you can still dillute the whole dish by extending it with new ingredients. For a cake, serve it with copious amounts of whipped cream, or with a creme anglaise sauce. For a stew, add more vegetables, and/or turn it into a soup by adding stock. If you have made a spicy green sauce, consider turning it into a dip by mixing it with 2-3 times its volume in yogurt or other dairy. An important point here is that there is no "magic ingredient" which somehow counteracts smells, no matter how many myths you hear about that. Just go for anything that adds a lot of volume per bite.
In some rare cases of shelf stable foods, you can absorb the excess smell. For example, if you made sugared petals and added a volatile essence that overpowers everything, you can keep them in a box with a bag of activated charcoal for a few weeks and see how much it has helped.
This is a somewhat unusual way to go. But there are ingredients which "trap" molecules so they are not as good at reaching your receptors. They are typically thickeners - xanthan is especially effective. Note that not every thickener will work, for example starch doesn't seem to have such an effect. The drawbacks:
- you need a fairly liquid food to apply them, and it will be much thicker afterwards. Also, you are limited in how much you can use, for example xanthan will give you a snotty effect if overused.
- all other aromas will also be reduced. You can try compensating by adding more seasoning of other types after the thickening, but you can't duplicate all of the flavor.
Distract the senses
As mentioned above, at each second, there are tons of sensory percepts vying for your attenetion. Even when you eat and try to concentrate fully on your food, the different aromas of the food arrive at once, and some are more noticeable than others. Also, the other sensory modalities mentioned can help.
Here, you can go very straightforward, for example by using something else that is fairly strong in smell and/or unusual for you, creating a stimulus which will compete with the undesirable aroma for attention. You can also use your sense of taste, and add something that strongly triggers it, again to outcompete the smell. Of course, if you overdo it, you will end up with a food which is unpleasant for another reason. Another strategy is to go more subtly about it, and add something which reduces the presence of other sensory information related to the smell - for example, if you used too much coconut in your yogurt, you can color it in a shade not associated with coconut at all, maybe a light purple. This will not be sufficient to combat your problem on its own, but it is worth doing along with other strategies.
What doesn't work
In practically all cases, there is no "antidote" which will magically neutralize the aroma you dislike and create an edible result. As we said above, the aroma is created by thousands by molecules, not by a single one, and it is impossible to find some chemical substance that will react with all of them (or even the worst offenders) and leave it clean. Rare exceptions could exist, where you react to a single molecule and there is the perfect ingredient that reacts it into something very different, but I can't come up with an example now.
There are also no selective "sponge foods" which go in, soak up the smell actively, and then your food is clean again. Foods which are rumored to work that way usually turn out to be simple dilutors.
Also, remember that you will never get rid of the smell entirely - see the part about our sense of smell reacting to parts per billion. You can only tone down its effect. So the more offensive the smell is to you, the less likely it is that a rescue attempt is worth the effort.
And an unfortunate caveat: The more you personally hate the taste, the less likely will the above work. Our nervous system doesn't just react to the concentration; it decides how intense "alarm signs" to send to your conscious thoughts depending on how objectionable it finds the smell. The consequence is that, the more you hate a given smell, the more likely you are to notice it when it is present, and so the tricks to not notice it don't work very well. Your brain is happy to be distracted from a given smell as long as it doesn't really get worked up about the smell - but if it hates it, you can't distract it.