How did Abraham Lincoln's election in 1860 spark the beginning of the Civil War?

South Carolina seceded from the Union along with 7 other states. These states became the Confederate States of America and they fought against the Union.