ATTACHMENT: a clinging to things, people, ideas, customs, etc., for the pleasure, comfort, or satisfaction they give us.
DETACHMENT: letting go of our need to find pleasure, comfort, or satisfaction in things, people, ideas, customs, etc., so that we seek God first in all things.
The key to detachment in the spiritual life can be quickly summed up in the admonition to "seek first the Kingdom of God, and all these things shall be added unto you."
Detaching ourselves from something or someone can range from very difficult to impossible, unless a greater love overshadows our attraction or affection. The key, then, to detachment, is to center our efforts on seeking to know God better, to love Him more, and to serve Him better. If this becomes our highest priority, as it should, detachment from our lesser gods will follow.
Detachment does not mean that someone or something has to be taken away from us, but that our relationship to the person or things must be purified. In detachment we learn to love people and things in right measure and for the glory of God. Sometimes, however, the Lord does step in and take away our created loves, or allows them to become disappointing to us, sot hat we find it easier to turn to him for what is lacking in our lives.
In the case of our problems, failures and concerns, to which we can also be attached, we will grow in our ability to turn these over to the Lord as we ourselves grow in love of Him, and develop a deeper trust in His loving providence. However, if we spend more time dwelling on these things than we do on loving and serving God, we are not seeking Him or His Kingdom first. But if we can keep these things "on the back burner" while we continually focus our loving gaze upon the Lord, He will certainly take care of them all in the best possible way. Our part in this process is to present our needs to Him in prayer, but without anxiety, trusting that He will hear us and do what is best.
Finally, we need to periodically make a careful examination of how we are spending our time in thoughts and actions. this will quickly help expose whether or not we are really seeking God first and foremost, and provide the key to further detachment.
It is only by detaching ourselves from our carnal and worldly (and therefore selfish) ideas of what is good and fostering a proper and holy attachment to God first that we will be able to form proper and holy and helpful attachments to our loved ones. As I understand it, this is what is meant by the command to love as God loves.