Satipatthana Sutta helps here.
[5] "Furthermore...just as a skilled butcher or his apprentice, having killed a cow, would sit at a crossroads cutting it up into pieces, the monk contemplates this very body — however it stands, however it is disposed — in terms of properties: 'In this body there is the earth property, the liquid property, the fire property, & the wind property.'
"In this way he remains focused internally on the body in & of itself, or focused externally... unsustained by anything in the world. This is how a monk remains focused on the body in & of itself.
[6] "Furthermore, as if he were to see a corpse cast away in a charnel ground — one day, two days, three days dead — bloated, livid, & festering, he applies it to this very body, 'This body, too: Such is its nature, such is its future, such its unavoidable fate'...
"Or again, as if he were to see a corpse cast away in a charnel ground, picked at by crows, vultures, & hawks, by dogs, hyenas, & various other creatures... a skeleton smeared with flesh & blood, connected with tendons... a fleshless skeleton smeared with blood, connected with tendons... a skeleton without flesh or blood, connected with tendons... bones detached from their tendons, scattered in all directions — here a hand bone, there a foot bone, here a shin bone, there a thigh bone, here a hip bone, there a back bone, here a rib, there a breast bone, here a shoulder bone, there a neck bone, here a jaw bone, there a tooth, here a skull... the bones whitened, somewhat like the color of shells... piled up, more than a year old... decomposed into a powder: He applies it to this very body, 'This body, too: Such is its nature, such is its future, such its unavoidable fate.'
"In this way he remains focused internally on the body in & of itself, or externally on the body in & of itself, or both internally & externally on the body in & of itself. Or he remains focused on the phenomenon of origination with regard to the body, on the phenomenon of passing away with regard to the body, or on the phenomenon of origination & passing away with regard to the body. Or his mindfulness that 'There is a body' is maintained to the extent of knowledge & remembrance. And he remains independent, unsustained by (not clinging to) anything in the world. This is how a monk remains focused on the body in & of itself.