The Craniotomy procedure
Any procedure which involves temporary or permanent removal of a portion of the cranium - the part of the skull containing the brain - is considered a craniotomy. The scalp is generally shaved, the incision made, and the bone removed. Generally, the bone fragment is replaced and cemented in place once the procedure is complete.
The history of craniotomies dates back to times predating written history. The Trephine, a sharp surgical instrument, was used to perform craniotomy procedures. These, presumably performed to let the evil spirit or poisonous humour causing the illness being treated, were apparently successful at least a portion of the time judging from Neolithic skulls with partially healed openings (some with two or three holes!).
Conditions in which craniotomies are commonly performed include brain tumors, intracerebral hemorrhage or blood clots due to trauma (subdural hematoma or epidural hematoma), cerebral aneurysms, damage to the dura, brain abscesses, trigeminal neuralgia, tic douloureux, and severe epilepsy.
Complications from craniotomies may include bleeding into the brain, infection, stroke, seizures, cerebral edema, or even permanent brain damage.
Current use of craniotomy
Currently, craniotomies have become less necessary since the advent of stereotactic surgery, which depends on computer-aided placement of probes and instruments through burr holes in the skull, and based on CT scans and precise positioning in three dimensions. The craniotomy is almost exclusively used during neurosurgery.
(See also Surgeon by Chark for a bit more on the history of craniotomy and surgery in general)