The Mishkan was draped with a series of coverings. The coverings were made of individual panels that were sewn together into two large tapestries that were then joined by clasps. Connecting the individual panels one to another required sewing, which is the melacha of tofeir.
Tofeir entails joining any two objects together, not just through a needle and thread. Using staples, tape or glue would also be considered the melacha of tofeir. (In some cases, when objects are not meant to remain connected for a long period of time, sticking them together might be permissible. A practical example of this might be diapers with Velcro-like adhesive tabs.)
Closing the front of garment with buttons or zippers is not tofeir, as it doesn’t join two separate pieces into one. As there are many types of fasteners – refrigerator magnets, stickers, safety pins, Post-It notes, etc. – it is advisable to familiarize oneself with the details of this surprisingly common melacha in order to know which are permissible and which are not.
This is just an introduction to the concepts of the melacha of tofeir; it is not a substitute for a full study of the halachos.