Earthing is when you directly connect with the energy of the earth through your physical body. Grounding often means a meditative technique when you energetically establish this connection, visualizing it in the safety of your mind.
There’s a scientific basis to grounding called the mind-body connection. In the case of grounding as a visualization method, the body follows the mind. In other words, as you energetically connect with the core of the earth in your meditation, you ground your energies as if you were touching it with your bare feet.