Static is caused by the transfer of electrons from one object to another. Transferring electrons can create an imbalance in the charge of the atoms in the two objects, making one more positive and one more negative, effectively attracting them to each other.
All material is made up of atoms. Atoms are comprised of positively charged protons, neutral neutrons and negatively charged electrons. Most of the time, atoms have equal numbers of protons and electrons and have a neutral charge.
When atoms come in contact with other atoms, electrons may transfer between them. An uneven transfer of electrons can create a positively or negatively charged atom. Atoms do not like to remain charged. An excess of electrons is discarded when the atom comes in contact with another atom with the opposite charge. The extra electrons will jump from one atom to another to achieve neutral charges. Sometimes, this jump is accompanied by a tingle or shock.
Some materials are more likely to accept additional electrons than others. Other materials are more likely to give up electrons. When these two differing types of objects come in close contact, static can easily be seen. Silk and glass are two excellent examples of materials that transfer electrons easily causing static.