A lobotomy is an operation on the brain.
The reason it sometimes works is not entirely clear, but it is used to calm agitated or aggressive mental patients, and for other reasons, such as to relieve depression or some obsessive-compulsive behaviors.
A lobotomy (more correctly a prefrontal lobotomy) involves cutting the connections to and from the prefrontal cortex of the brain. That is, the two lobes of the brain in front, behind the forehead. Initially, the operation, which was first used in the early part of the 20th century, was quite crude. The head had to be cut open. Risk of infection was pretty high, as you might imagine in primitive brain surgery. But it had a high rate of success in calming the patient down. Often, of course, this calming was to the extent that the patient didn't care one way or the other anymore, or, in some cases, became rather unresponsive generally.
As the science progressed through the years, ways were discovered to perform the cutting of the brain without opening the skull radically. For example, in one technique, a small hole was drilled in the side of the head and a cutting instrument was inserted in that hole.
Dr. Freeman was the inventor of the transorbital lobotomy. In this procedure, and ice pick-like device was inserted through the patient's eye socket and tapped with a hammer to break through the thin bone layer, and into the brain's frontal lobe. The patient was "anesthetized" prior to this by using electric shock to induce convulsions. The procedure was done through both eyes, cutting both frontal lobes.
You can watch a short video of the procedure here, from a PBS documentary on Dr. Freeman.
One of the most famous lobotomies, and one of the most tragic, was performed on Rosemary Kennedy, daughter of Joseph Kennedy and sister of President Kennedy. Rosemary wasn't that abnormal. She was prone to mood swings and was a little "slow" compared to her brilliant siblings, perhaps a little clumsy, but not severely mentally deficient (she could do division and multiplication) She was presented to King George VI and Queen Elizabeth in 1938 (her father was the American Ambassador to the Court of St. James's) and, it is said, she stumbled a bit on her curtsey, which embarrassed her father. But she was all right. She spoke well, dressed well, kept a diary. Her older brother John doted on her. The lobotomy, performed by Dr. Freeman, left her an incontinent vegetable who could only babble. A tragedy. You can read a bit more about her on the below link under the pictures.
Rosemary is standing left, rear, in the below photo.