How does a spinal fusion work?

Stops motion. The purpose of a lumbar fusion procedure is to stabilize the segment in the lumbar spine. It stops motion in that segment to treat back pain and possibly nerve root compression leading to leg pain, weakness, numbness, or any combination of those. It relies on removing the disc and replacing with bone graft. In addition, screws and rods are used to hold this in place while the fusion occurs.
This depends on why. It is being done: to prevent further deformity or a chance of deformity, to correct or prevent instability, as part of a procedure to relieve pain from a disc issue, to correct a tumor, to correct an infection as the most common reasons. A fusion is a joining of two or more spine segments together.