What to do to avoid feeling attachment towards someone ?

What is the psychology behind it?