Dr. Sanjay Gupta explains what you need to know about this and other types of knee surgery on a special edition of "SGMD," Saturday-Sunday, 7:30 a.m. ET.
(CNN) -- Robin Gray's knee had been bothering her for almost two years, but when it finally got to the point where it interfered with her duties as a custodian at Emory University, she knew it was time to take action.
"I can go to work, but it's getting to where it hurts all the time," Gray said.
Her doctor, Dr. Shervin Oskouei knew exactly what had to come next for Gray: total knee replacement.
"You can see in her right knee, especially on the medial side, she has no space left between her femur and her tibia," he said.
No space -- meaning no cartilage between the two bones that make up the knee joint -- can cause tremendous pain.
Having to undergo surgery was not good news for Gray, though total knee replacement surgery is among the most common surgeries performed today in the United States.
According to the American Academy of Orthopedic Surgeons, more than 500,000 people go under the knife each year to have arthritic and damaged knees replaced.
Oskouei invited CNN into his operating room for Gray's surgery, to see exactly how the operation is done.
Step 1: The 'time out'
Wrong-site or wrong-patient surgeries occur more than five times per day in the United States, according to the Joint Commission, an independent health care accreditation group.
To avoid "wrong-side" surgeries -- such as operating on the wrong knee, or even the wrong patient -- The American College of Surgeons has adopted a number of precautions.
Before the patient is sedated, the surgeon and the anesthesiologist will mark the appropriate surgery site with the patient watching. Often, they will sign their initials directly on the skin using a marker.
Once the patient is wheeled into the operating room, the operating room nurse will again check with the patient and surgeons to ensure that the correct site is being operated on.
Finally, once the patient is asleep, but before the first cut is made, the surgeon will again take a "timeout" to announce what operation he or she is going to perform, and on what side of the patient's body. Once the entire OR staff agrees, the operation can begin.
Step 2: The incision
The first step in any operation -- gain access to the affected area. In Gray's case, that means making 4- to 6-inch cut, starting just above the base of the femur, or thigh bone, and ending just below the head of the tibia, or leg bone.
The cut goes through each of the skin layers, the fat layer, and through the fascia -- a fibrous coating that surrounds the body's organs and cavities.
Step 3: Evaluate the damage
Once the surgeon has gained access to the joint, the next step is to assess the extent of the damage to the bones, cartilage, tendons and ligaments. Some of this can be done with the use of MRI imaging before the surgery, but actually being able to see and touch the affected area gives surgeons a far better idea how extensive their repairs will need to be.
In Gray's case, the cartilage between the femur and tibia was completely worn away, and bone spurs, splinter-like protrusions from the bones, had begun to form.
Step 4: Measure
As in any "construction project," accurate measurements are extremely important. In this case, when the project is someone's knee, there is no room for error.
Surgeons first take measurements of exactly how much of the femur and tibia bones will need to be removed to make room for the implant.
Step 5: Install guides and cut
To ensure that they are cutting away only the diseased parts of the bone, surgeons drill small holes into the head of the bones, and install a cutting guide. These metal appliances have small slits for the saw blade to pass through, and allow the surgeons to cut only the areas of bone they want to cut and protecting the rest of the bone.
Once the guides are installed and measurements are triple-checked, the surgeon uses a bone saw to make the appropriate cuts.
Step 6: Install the implants and close
Once the bone cuts are made, the surgeon will use a test implant to make sure they've selected the appropriate size and that the knee will flex and extend properly with the implant in place.
Once the size is confirmed, the surgeon will then install the femur cap and tibial cap, as well as the cartilage replacement piece permanently. Once again, the surgeon tests the fit and stability of the new knee, and closes the incision.
Step 7: Post-op and rehab
Once the patient leaves the hospital, active physical therapy begins. The patient will often have physical therapy several times a week for one to two months. Physical therapy often includes things such as range-of-motion and strengthening exercises designed to improve knee flexibility.
Patients with successful knee replacements often go on to be more mobile and agile than they were before surgery. Even so, high-impact activities like running and contact sports are usually discouraged for knee replacement patients.
As for Gray, her surgery was a great success, and though rehab was difficult, she says overall she's glad she did it.
"It's a whole lot better."