When you pass an electric current through a coil, a magnetic field is produced. Conversely, when you pass a magnetic field through a coil (or vice versa), there is an electric current produced in the coil. So, the base of the toothbrush is producing an oscillating magnetic field (you need movement to induce current in the coil) and the coil in the toothbrush is producing an electric current due to the changing field and storing that power in a rechargeable battery. That's the basic theory.