Grounding - one of the most important parts of everyday life not just a spiritual one. I wish more people knew about grounding and took the time to participate in it, I think the world would be a lot more mellow.
Why do we ground? Well really we are essentially energy beings, sometimes that energy gets out of whack and we need to ground it out in order to return to balance. We need to ground before we undertake any highly spiritual activity to ensure that we are in balance and tethered to this realm. Empaths ground a lot, especially when they feel others emotions strongly, it helps them deal with the energies that don't belong to them.
When do we ground? Whenever we feel the need to. Sometimes we ground to re-balance ourselves, to get rid of negative emotions, before ritual or other spiritual practices, when we're feeling drained etc.
How do we ground? In oh so many different ways. We can physically touch the earth (bare feet, hands, lay down on it or just touch it in some way - ever notice that if you're really annoyed you will want to walk it out - you're releasing energy through contact with the ground). You can also hold a crystal and channel your energies into that (make sure you cleanse regularly if you're going to do that). A common one is to visualize roots, either from your feet or tail bone, extending into the earth - this is a good one because you cant be anywhere to do this and nobody is any the wiser. You can ground with a partner, stomp or shake it out, the list could go on and on. I bet there are even some times you don't realize you're doing it.
I honestly don't know how I ever did without this technique in my life, it has saved me numerous times. I appear to be quite empathic and so I keep crystals around me at all times so that I have something to ground out into if I need it or if I can I try to get outside (sometimes it takes me a little while to realize what is going on but I get there eventually). Its a great way to start your day off too. Taking a moment to just ground and center oneself.