Attachment is developed when you start thinking of object before the use and after. Like if you get to test ride a new bike in a showroom, you'll be thinking of how smooth the bike was on the road and how good the shock absorber on it are may be for next couple of hours or if you're a bike enthusiast, may be days. Another example is like going for a lavish dinner. Unlike the food you eat daily, you'll be thinking now before the act anticipating what cuisine you might find there or how should you be impeccable in your table manners or after the act about how soft the bread was or how well the presentation of every dish was etc. etc. This is thinking about the sense object that causes attachment. I demonstrated positive examples here but obviously they can be negative as well.
To not create attachment to anything, one has to have equanimity of mind when interacting with objects, old or new, good or bad. The person who looks at mud and gold with the same state of mind doesn't create craving or aversion to anything