There are a few ways this can happen:
* Conduction: Charges can move directly from the object to another object through direct contact.
* Induction: A charged object can induce a charge on a nearby object, causing charges to redistribute and then move off the original object.
* Corona discharge: Charges can leak off a sharp point or edge of an object due to the high electric field concentration at that point.
* Sparking: A rapid discharge of static electricity can occur when the electric field between two objects becomes strong enough to ionize the air, creating a spark.
The term "discharge" is used generally to describe the process of losing static electricity, regardless of the specific mechanism.