if you want the Buddha's answer, in brief it's by seeing things as they exist: they are compounded, impermanent, without inherent existence. In other words, they are "suffering." When we really understand this basic principle, our attachments are supposed to cease on their own. Easier said than done of course. One of the purposes of meditation in Buddhism is to observe the arising, persistence, and falling away of bodily and mental phenomena, so that we actually see the Buddha's thesis about the world in action and relate it to our own experience.
Morality is also supposed to play a role in this process. Cultivating things like nonviolence, generosity, truthfulness, and sobriety put the mind at ease and create a context in which insight meditation is more easily developed.
I can direct you to some books and even free ebooks if you're interested. There is staggering amount of Buddhist literature distributed for free online.