Spinal cord compression occurs when a mass, such as a tumor, puts pressure on the spinal cord. This can lead to significant neurological deficits and can be a medical emergency. In the context of cancer, this condition is often caused by metastatic tumors that have spread to the spine.