Watch the Cancer.Net Video: Basics of Cancer Surgery with Robert Sticca, MD , adapted from this content.
Surgery is the removal of the tumor and surrounding tissue during an operation. A doctor who specializes in treating cancer using surgery is called a surgical oncologist. Surgery is the oldest type of cancer therapy and remains an effective treatment for many types of cancer today.
The goals of surgery vary. However, it is used for the following reasons:
To diagnose cancer
To remove all or some of a cancer or tumor
Find out where the cancer is located
Find out if the cancer has spread or is affecting the functions of other organs in the body
To restore the body's appearance or function
To relieve side effects
The location where you have surgery depends on the extent of the surgery and how much recovery you need. You may have surgery in a doctor's office, clinic, surgery center, or hospital. Outpatient surgery means that you do not need to stay overnight in the hospital before or after surgery. Inpatient surgery means that you do need to stay in the hospital overnight or longer to recover after the surgery.
Types of conventional surgery
Diagnostic. For most types of cancer, a biopsy is the only way to make a definitive diagnosis. During a surgical biopsy, the surgeon makes a cut called an incision in the skin. Then, he or she removes some or all of the suspicious tissue.
There are 2 main types of surgical biopsies :
An incisional biopsy is the removal of a piece of the suspicious area for examination.
An excisional biopsy is the removal of the entire suspicious area, such as an unusual mole or a lump.
After a biopsy, a pathologist uses a microscope to examine the tissue removed. A pathologist is a doctor who specializes in interpreting laboratory tests and evaluating cells, tissues, and organs to diagnose disease. The pathologist provides a pathology report  to the surgeon or oncologist, who makes the diagnosis.
Staging. Staging surgery is performed to find out the size of the tumor and if or where it has spread. During this surgery, the doctor often removes some lymph nodes near the cancer to find out if it has spread. Lymph nodes are tiny, bean-shaped organs that help fight infection.
Your health care team uses the results from this surgery along with the results of other tests to guide the treatment options. These tests can also help predict a patient’s prognosis, which is the chance of recovery. The stage of cancer may also be included on the pathology report (see above).
Tumor removal, also called curative or primary surgery. Surgery is most commonly used to remove the tumor and some of the surrounding healthy tissue. The tissue surrounding the tumor is called the margin.
Tumor removal may be the only treatment, or it may be combined with:
With conventional surgery, the surgeon makes large incisions through skin, muscle, and sometimes bone. In some situations, surgeons can use surgical techniques that are less invasive. These less-invasive techniques may speed recovery and reduce pain afterwards. Learn more about types of minimally invasive surgery below.
Debulking. Sometimes, the surgeon cannot remove the entire tumor or removing it might cause too much damage to the body. In these situations, surgery is used to remove as much of the tumor as possible. Other treatments, such as radiation therapy or chemotherapy, may also be used to shrink the remaining cancer. These treatments may also be given before surgery to help shrink the tumor so it can be removed.
Palliation. Palliative surgery is used to relieve side effects caused by a tumor. It plays an important role in improving quality of life for patients with advanced cancer or widespread disease. For example, surgery may be used to:
Relieve pain or restore physical function when a tumor causes the following complications:
Pressure on a nerve or the spinal cord
Blockage of the bowel or intestines
Pressure or blockage elsewhere in the body.
Stop bleeding. Certain cancers are more likely to cause bleeding, including:
Cancers in areas with a high concentration of blood vessels, such as the uterus,
Cancers in organs that are fragile and can easily bleed when food and waste products pass through, such as the esophagus, stomach, and bowel.
Bleeding may also be a side effect of some drugs used to treat cancer. When surgery is needed to stop bleeding, a common technique is suture ligation. This surgery involves tying blood vessels using surgical thread.
Insert a feeding tube or tubes that deliver medications if the cancer or treatment has made it difficult to eat. A feeding tube is inserted directly into the stomach or intestine through the abdominal wall. Or, a tube may be inserted into a vein to deliver pain medication or chemotherapy .
Prevent broken bones. Bones weakened by cancer or cancer treatment can break easily and often heal slowly. Inserting a metal rod may help prevent fractures of weak bones and relieve pain during healing.
Reconstruction. After primary cancer surgery, surgery may be an option to restore the body's appearance or function. This is called reconstructive or plastic surgery. Reconstructive surgery may be done at the same time as surgery to remove the tumor. Or, it may be done later after a person has healed or received additional treatment. Examples of reconstructive surgery include breast reconstruction after a mastectomy  and surgery to restore a person’s appearance and function after surgery to the head and neck area .
Prevention. Some surgery is performed to reduce the risk of developing cancer. For example, doctors often recommend the removal of precancerous polyps in the colon to prevent colon cancer. In addition, women with a strong family history of breast or ovarian cancers  or known mutations to the BRCA1 and BRCA2 breast and ovarian cancer genes may decide to have a mastectomy or oophorectomy to lower the risk of developing breast or ovarian cancer. A mastectomy is the removal of a breast. An oophorectomy is the removal of the ovaries.
Learn more about common types of surgery for specific cancer types .
Types of minimally invasive surgery
As mentioned above, conventional surgery often requires large incisions. In some situations, a surgeon can use one or more small incisions. These surgeries typically result in shorter recovery times and less pain afterwards. Below are some examples of minimally invasive procedures and surgeries:
Laparoscopic surgery. The doctor performs surgery through small incisions in the skin using a thin, lighted tube with a camera. The term laparoscopy refers to a minimally invasive surgery of the abdomen. The terms, mediastinoscopy and thoracoscopy are used when the same type of procedure is performed in the chest. Laparoscopic surgery may also be done with robotic assistance for some surgeries. During this type of surgery, the surgeon directs robotic instruments to perform the surgery. This surgical procedure may be used for the kidneys, a man’s prostate, or a woman’s uterus or ovaries.
Laser surgery. The doctor uses a narrow beam of high-intensity light to remove cancerous tissue.
Cryosurgery. The doctor uses liquid nitrogen to freeze and kill abnormal cells.
Mohs micrographic surgery, also called microscopically controlled surgery. The dermatologist shaves off a skin cancer, one layer at a time, until all cells in a layer appear to be normal cells when viewed under a microscope.
Endoscopy. The doctor inserts a thin, flexible tube with a light and camera on the tip into the body. This device is called an endoscope. It may be inserted into the mouth, rectum, or vagina to examine the internal organs. During an endoscopic procedure, it is possible to remove samples of potentially abnormal tissue for further examination. Learn more about types of endoscopy .
American College of Surgeons: Surgical Patient Education for a Better Recovery