Static means still or stationary, while electricity is a flow of electrons or current, so the two together refers to stationary electron flow, which is better understood as an electric charge. In an electric charge, electrons are exchanges from one neutral surface to another and remain until they are bled off slowly or all at once in what is known as an electric shock or static discharge. This discharge is the act of electrons jumping from a charged surface to a conducting surface, such as most metals.
The principle behind the exchange of electrons starts with atoms. Atoms are constructed with a nucleus made up of protons and neutrons, and are orbited by electrons. As protons carry positive charges, neutrons are neutral, and electrons are negative, there are usually the same number of protons and electrons in an atom. With some atoms, certainly those of common insulators, the atoms are very reluctant to give up their electrons and restrict the flow across them. However, when atoms come in contact with one another, they can lose or gain electrons, with one series becoming more positive by the lack of electrons, and the other series more negative. This negative collection of extra electrons will flow to other atoms that are more willing to exchange electrons, which is true of most metal atoms.
To create or generate (as energy can be neither created nor destroyed) static electricity, one need only rub two insulators (like glass rod on fur, shoes on carpet, etc) together, because this will increase the area atoms can interact with each other. Electrons will cross into one of the objects and give it a temporary charge. If this is done in winter, the dry air will lengthen the time it takes for the electrons to be lost, thus allowing one to retain a charge for longer durations. If this object is left alone it will gradually lose its charge completely.
In nature the process of ice particles rising and falling in clouds produces a similar effect. This negative potential across the bottoms of the clouds creates forms an opposite positive charge on their tops, as well as on the surface of the ground below. Because air is an insulator, the electric charge remains in the clouds until the charge forms a path to the ground below in what’s referred to as a dielectric breakdown. Although this behavior is similar to what is found across a capacitor in an electric circuit, it is actually caused by static electricity.