Contemplate the foul:
"Sick, putrid, unclean:
look, Nanda, at this physical heap.
Through contemplation of the foul,
develop your mind,
make it one, well-centered.
As this [your body], so that.
As that, so this.
It gives off a foul stench,
(the body) the delight of fools.” —Therigatha, 5.4
Cycle of impermanence:
The cycle of impermanence has three phases: (1) origination; (2) maturity; (3) dissolution (ageing, sickness, death). Foul odours are an indication of the dissolution phase. Due to primal tendencies the mind has a preference for the ‘ripeness’ part of the cycle, therefore contemplation of the dissolution phase at every opportunity must be systematically cultivated to counter that pernicious influence.
"Even though I was endowed with such fortune, such total refinement, the thought occurred to me: 'When an untaught, run-of-the-mill person, himself subject to death, not beyond death, sees another who is dead, he is horrified, humiliated, & disgusted, oblivious to himself that he too is subject to death, not beyond death. And if I — who am subject to death, not beyond death — were to be horrified, humiliated, & disgusted on seeing another person who is dead, that would not be fitting for me.' As I noticed this, the living person's intoxication with life entirely dropped away.”—-AN 3.38
Systematic development leads to shift in perception:
“Continuity in developing awareness of impermanence is essential if it is really to affect one’s mental condition. Sustained contemplation of impermanence leads to a shift in one’s normal way of experiencing reality, which hitherto tacitly assumed the temporal stability of the perceiver and the perceived objects. Once both are experienced as changing processes, all notions of stable existence and substantiality vanish, thereby radically reshaping one’s paradigm of experience.
Contemplation of impermanence has to be comprehensive, for if any aspect of experience is still taken to be permanent, awakening will be impossible. A comprehensive realization of impermanence is a distinctive feature of stream-entry. This is the case to such an extent that a stream-enterer is incapable of believing any phenomenon to be permanent.”—-“Satipatthana: The Direct Path to Realization”, Ven Analayo.