Hinduism, Buddhism, and Jainism all share the principle of non-attachment (Vairagya). There is a big difference between attachment and non-attachment in terms of life. Attachment means to hold tightly on materialistic things like money, mobile, house, car, etc. without which you can't live happily.
Attachment creates mental bonds, which you believe it's important and this is one of the root causes of suffering. All attachment can only bring happiness through your sense organs and limit your awareness and knowledge. When you attach yourself with some sense object they determine your mood swings.
If you don't get good food one day you become angry or sad. If you have no money you become disappointed. Connection with sense object will only result in attachment. If you see saints and gurus they try to avoid attaching with these objects because they really don't want sense gratification. Bhadavag Gita also quotes the same that suffering comes from our attachment.
First, you get attached to something, then it leads to desire. If the desire is not fulfilled, then anger arises. Which leads to delusion. Once you get delusion, then you will get confused and you will lose the ability to choose wisely and take a wrong decision. This will have a conscience and binds us to the vicious cycle of birth and death.
We are living our life as if to fulfill our desire to stop our suffering. But we all need to take a minute and think is this true? Will fulfilling our desires really give us all freedom from our suffering? The answer is no. we are actually forgetting the real purpose of life.
We are so busy in our life that we can't even think for a moment " what is the purpose of my life?". We are busy collecting things in our life for sense gratification of which many are not needed at all. For example, you may only need 1 car, but people nowadays got 2 or 3 cars which are absolutely not necessary. For busy these extra cars they may have to work hard, spend long time suffering mentally or physically.
In the Buddhist Point of View Attachment is recognised as the source of our pain and suffering. Our life is very uncertain, it can never give happiness with sense objects.Life does not always happen as we expect it to be.Due to its uncertainty, we are always worried about the future or past. Because of this anxiety we forget to live and enjoy in the present.
If attachment is for the spiritual growth then there is no issues. In the first stage diciple is asked to worship with idol but in latter stage or when the diciple is advanced guru ask the deciple to remove that idol worship because that is also a kind of attachment. all attachments are creating karma and stands in the way of our liberation.
By cultivating different yogic practices we can get rid of attachments slowly.
To be free or liberated we must learn to let go of everything happily. We must not be in any kind of fear to let go of things which are dear to us. we need to be aware of our actions and thoughts.
When you do anything just keep in mind that every action should be done with purity. no selfish motive should be there behind any action. Once you keep following these paths slowly you will transform yourself in a period of time.