In a full sentence (ie, with a verb), if the body part is preceded by a possessive adjective "ses/son/sa/leur/leurs", it means that the body part does not belong to the body of the subject (note: this is true for "correct" French: in relaxed speech, speakers may tend to use a possessive article indifferently. This is for instance a mistake children tend to make and that teachers will then frown upon).
If the body part belongs to the subject of the verb, the rule is then to use a reflexive pronoun with the verb, and no possessive article.
Ex: compare:
- Elle aime masser ses jambes: the legs are someone else's legs (who the "ses" refers to should be given from the context)
- Elle aime se masser les jambes: the legs belong to the subject ("elle")
Similar example: il se lave les mains vs. il lave ses mains, etc.
With the possessives "mon/ma/mes/ton/tes/notre/nos/votre/vos", there is of course no ambiguity on whose body parts they are, but still the "correct" usage is to use a reflexive pronoun and no possessive article.
Ex: je me masse les jambes ("je masse mes jambes" can be found, but may be considered as poor phrasing).