The last line of the poem "Ode to the Beautiful Nude" is an example of a metaphor. A metaphor is a figure of speech used to implicitly compare two things that are unrelated as if they had something in common.
The moon lives in the lining of your skin
refers to the inner glow that seems to emanate from the portrait of this striking woman. This inner glow metaphorically transforms the shape of the woman making her profile contrast against her background, glowing even more strikingly.
Therefore, Neruda uses the moon, which is our universal glowing light in the darkness, to suggest that it is the moon itself that is actually enveloping the woman because such is the grandiosity of her beauty.
Keep in mind as well that this last verse came after a stanza which equally treated the topic of "light" flowing out of the woman's shape:
It is not only light that falls over the world spreading inside your body
Yet suffocate itself
So much is clarity
Taking its leave of you
As if you were on fire within
The use of the moon brings out a sense of light in the middle of darkness, which is juxtaposed to the brightness that is illustrated with the use of the fire as an element of light. Therefore, the verse also serves as a balancing image to complete the poem.
Neruda is writing in Spanish, of course. An alternate translation of the line is "Under your skin the moon is alive." Neruda's poem is about a woman, yes, but also about the problem of vision and the role of poetry (his poetry) in revealing the true beauty of things. Neruda seeks to see the woman with a "chaste heart" and "pure eyes" as she lies down in the "bed" of his poem. What the poet discerns is that far from existing separate from the world, the woman's body somehow is the world ("From what materials / Agate? / Quartz? / Wheat? / Did your body come together") so that enclosed (or contained by) in the perfection of her beauty is the beauty of the universe—that rather than be in the world, somehow, the world is in the woman. The final stanza articulates this idea: the poet is able to see the nude not because of the "light that falls over the world spreading inside your body" but because she is herself he source of illumination, as if she were "on fire within"—or as if the moon were inside her skin. Her beauty is itself the thing that makes the poet's vision possible—in a way, rather than poet seeing her, and writing about her, her beauty "illuminates" or writes the poem.