Esters are known to have a fruit smelling odor. Upon the reaction of carboxylic acid and alcohol, esters is produced. And the presence of fruit-like odor is one of the signs to know if an ester is produced in the reaction. The odors of fruits are due to the presence of complicated mixtures of chemicals (and not always just esters).
We can smell esters because as the reaction proceed, some of the esters formed evaporate and mix to the air thus we can smell it. That is why some esters of low molecular weight are used as fragrance.
Hope this helps :)