A craniotomy involves removing a portion of the skull for brain surgery. A craniotomy may be done to take a sample of brain tissue or to treat conditions or injuries that affect the brain. The procedure is used to treat brain tumors, bleeding in the brain, blood clots or seizures.