Umbilical cord compression occurs when the cord gets stretched or compressed during labor, leading to a brief decrease in blood flow to the fetus.