How does static electricity form?
It is due to accumulation of charges on an object.
When charges (electrons) accumulate on a body, it becomes negatively charged with excess electrons while the body losing electrons is positively charged.
The bodies possess static electricity and the properties of such charges are studied under the subject of electrostatics.
Electrostatics deals with fields, potentials and forces due to static charges.