Static electricity occurs when an electric charge builds up on the surface of an object. The charge will remain until it is neutralized by discharging or until it goes to ground. Static can be a problem, sometimes interfering with sensitive electronic devices, such as computers or magnetic media. There have also been instances of a static discharge igniting volatile substances and creating an explosion or fire. If a person is the conduit through which static is neutralized, not only can a spark be seen and heard, but it is often also painful.
There are a number of ways to get rid of static electricity. There are also ways to minimize the buildup of static, which helps to reduce how much static is present in the first place. If you can significantly limit the buildup of static, you may find that there is not enough of it present to be a problem.
One good way to prevent static from forming in the first place is to try to minimize the contact between surfaces where at least one of them is in motion. For example, shuffling your feet on a carpet is almost guaranteed to produce static buildup. Lifting your feet when you walk will minimize this effect and greatly reduce how much static is created. If it is an ongoing problem, you might try changing shoes, as different types of soles will interact differently with various floor surfaces, and you may be able to prevent static buildup.
One thing that can help tremendously in eliminating static is to use an anti-static spray on surfaces where static tends to build up, such as carpets, rugs, and nylon clothing. You can buy ready-made sprays created for this purpose, or you can make your own. The easiest thing to do is to get some liquid fabric softener and a spray bottle that can be set to put out a mist. Mix the fabric softener with a small amount of water, in a ratio of about 4 to 1. Mist this over any carpeted areas. You can also use it on clothing, chairs, and any other fabric surfaces where you find you have a static buildup problem occurring. Be sure to test the mixture in an inconspicuous place to make sure it is compatible with the material before using it over a large area.
A couple of other suggestions which may sound a little odd but work well to get rid of static are first, for anyone with very hairy legs to shave their legs. This may sound strange but it can make a significant difference to the amount of static buildup which occurs. Another thing that helps to get rid of static is to carry a dryer sheet in your pocket, and to rub it once in awhile. It works to discharge static and can be a useful tool in many situations.
Also, because dry conditions increase the buildup of static electricity, try different things to increase the humidity. Open a window, use a humidifier, or keep a pot of water simmering on the back of the stove, especially if you use a wood stove.
If you suspect you may trigger a static discharge when you touch a surface, get rid of the static by holding something metal, such as a key, in your hand and touching it to a metal surface before you touch anything with any part of your body. If you are using volatile chemicals, such as filling a gas can, discharge the static first by touching a safe metal surface, such as your car, to discharge the static before you pump the gasoline. Around electronic equipment touch a grounded surface before you touch sensitive components. You can buy or make a grounding pad to keep near any sensitive equipment. Touching this pad first will discharge any static safely to ground and keep it from being a problem to your equipment. There are also static control wristbands which are available and can be used around some types of electronic equipment.
There are other products which can be purchased to control static when it is essential to have it controlled, but for most general situations the above suggestions will help quite a bit to get rid of static.