Teachers, Instructors, and Professors...
High school teachers - It is unlikely that a high school teacher will have a CS degree or any real-world programming experience. Hopefully your high-school teacher enjoys programming. The worst case is that he/she was just been handed a teacher's edition of the book, or maybe took a "how to teach programming" class, and was assigned to teach the class.
Community college instructors - Your community college instructor probably enjoys programming (and enjoys teaching programming) and may have a "day job" as a programmer. He/she may have a CS degree or an engineering degree in another subject.
University professors - A Computer Science professor will have a PhD in CS (That's a 4-year degree and at least 2 more years). At a minimum, university courses are taught by graduate students (students with a 4-year degree, working on a higher degree). Some university courses are going to be heavy on theory, and light on practical programming... So, after a year of self-study, you might be writing cooler programs than a university student. But after 4 years, the university student will probably be way ahead.
[EDIT]
Most people with programming JOBS have a 4-year degree in Computer Science, Science or Engineering. I would have predected that lots of us here are curious self-tought hobbyists-types. (I almost want to say hackers, but that word has lots of different meanings.)