Hedor vs. peste vs. olor
In the Spanish language, 'hedor', 'peste' and 'olor' all carry the connotation of a smell, but each comes with its contextual nuances and subtleties. Their connotations and usage can largely determine which of these words is most appropriate to use in a given situation.
Hedor
'Hedor' refers to an unpleasant, strong or intense smell. However, it does not imply a source or cause like 'peste'.
El hedor de la basura es insufrible.
(The stench from the garbage is unbearable.)
El hedor en la habitación después de una fiesta siempre es desagradable.
(The stench in the room after a party is always unpleasant.)
Peste
'Peste' usually denotes a very unpleasant smell, often related to sickness or decay. It can also literally mean 'plague' and sometimes used as metaphorical for anything severely disliked.
La peste de los cadáveres era abrumadora en el campo de batalla.
(The stench of the dead bodies was overwhelming on the battlefield.)
Había peste a alcantarillado en toda la ciudad.
(There was a sewage stink throughout the city.)
Olor
'Olor' is the most general term among these words meaning any kind of smell, be it pleasant or unpleasant. Unlike 'hedor' and 'peste', 'olor' can be qualified with modifiers to describe specific type of smells.
Este perfume tiene un olor delicioso.
(This perfume has a delightful smell.)
Hay un olor extraño en esta habitación.
(There is a strange smell in this room.)
Summary
While 'hedor', 'peste', and 'olor' all refer to some kind of smell in Spanish, they each convey their own unique additions to that basic concept. 'Hedor' suggests a severely unpleasant scent, while 'peste' adds a sense of lingering illness or decay. On the other hand, 'olor' serves as an all-encompassing term for any kind of smell - good, bad or otherwise.