The Mayo Clinic says this: Deep brain stimulation involves implanting electrodes within certain areas of your brain. These electrodes produce electrical impulses that regulate abnormal impulses. Or the electrical impulses can affect certain cells and chemicals within the brain.
That's the lead-off paragraph from this page:
Deep brain stimulation - Mayo Clinic There's a lot of information included.