I'm not a teacher, but I hope my advice can help!
Attaching something would be to put something together by jointing/adding it on. Let me see if I can think of an example... A spacecraft detaches from the rocket once it's in orbit.
Connecting something would be to link something together. If I had two magnetic chains with magnetic ends, I could connect them together by putting the two ends together.
I hope this helps!