My school teacher told me that it was NOT about slavery, but my recent internet searches have confused me. So was it, or wasn't it?
It was about slavery, as /u/Georgy_K_Zhukov documents thoroughly. If your teacher has any specific claims, or you've found any elsewhere, about alternative causations we're quite happy to discuss the problems with those arguments, but he's very thorough. Likewise if you have follow-up questions or anything's confusing. We get this question a lot so we have a really good answer lined up, but obviously we can't anticipate everything and you are absolutely in the right place to ask.
Not to discourage any further answers, but I highly recommend you check out our FAQ on the causes of the Civil War which was in fact about slavery.