Vaughan Bell in Mind Hacks:
Frontiers in Neuroscience has an amazing scientific article that has collected all the studies that have recorded what happens when the brain is electrically stimulated in living patients. It's like a travel guide to the unnaturally active brain.
As you might expect, science generally takes a dim view of researchers cracking open people's skulls just to see what happens when bits of their brain are stimulated, hence, almost all of these studies have been done on patients who are undergoing brain surgery but have agreed to spend a few minutes during the operation to report their experiences for the benefit of neuroscience.
This procedure is also essential in some forms of brain surgery to make sure the surgeons avoid essential areas. For example, in some cases of otherwise untreatable epilepsy the surgeons track down the 'foci' or trigger area, and can often stop seizures completely just by removing it.
However, if an area is heavily involved in speech production, you wouldn't necessarily want to give up being able to talk for the sake of being seizure free, so surgeons will open the skull, wake you up, and then ask you to speak while stimulating the areas they are considering removing. They can map your speech areas by seeing when you can't speak as the areas are stimulated, and hence, know what areas to avoid.