When you come close to something but don't quite get there.
Just short of success
This phrase originated in the 1920's. Fair grounds would give cigars away as prizes. Prizes were more aimed at the adults then vs. children like they are now. The fair workers would shout out "close but no cigar".... The first written documentation of this word appeared in the 1930's and then became a common phrase.
You finish second in a race
A friend asks how you did
You tell them "I finished in second place, close but no cigar"
A popular euphemism for a parent (usually the Dad) walking out and abandoning their kids/family, where the abandonment takes place under the cover of a harmless, non-suspicious errand like going to get cigarettes.