To attach is to put two things together.
I attached the socks to the clothesline to dry.
Example picture