My favorite teacher was actually a substitute that I had frequently throughout elementary and middle school. Everyone else utterly despised her, but for some reason I always loved having her, even when I was six or seven years old and all of my classmates were afraid of her. She was very strict, but she was definitely able to control a class better than a lot of the full-time teachers that I had, and everyone sat quietly and listened well when she taught.
Looking back, I guess I was sort of an odd child. The first time I had her was in first grade. My actual teacher that year was basically like a grandmother to us, but she was absent for an entire week and asked this substitute to fill in for her. All of my classmates were terrified of her. I cried the day she left. sweatdrop
She was honestly a lot nicer than people realized, though; she would always stop to talk to me whenever she was in our school. I suppose part of it was that I actually listened and respected her, but I think her personality and how she spoke just intimidates a lot of people.
As for my worst teacher? I've had quite a few, but the absolute worst was probably my fourth grade teacher. I never did anything to offend her, but she decided pretty much from the start that she disliked me, mainly just for being quiet and keeping to myself. Somehow she had this idea that I was this snobby, rude little kid; in reality, I was so introverted because I was bullied nonstop that year and had next to no friends. She was pretty unfair and would look for any excuse to get me in trouble, though.
I had a similar teacher my junior year as well. She favored all of the "popular" kids, especially the athletes, even though a lot of them were actually superficial, arrogant bullies, and she would glare at my friends and I for no particular reason and acted like there was something wrong with us just because we weren't as social as the kids she liked. She basically acted like she never grew up after high school and was still obsessed with being a part of that "in-crowd" and trying to impress them. It was pretty sickening. I think I did manage to get on her good side by the end of the year though.