How did slavery and state rights contribute to the Civil War?

Slavery was a very large part of the start on the war and when the Republican Party won the election the Confederates launched their plan. They seceded from the Union.