As a student, I found there to be a remarkably similarity in the effect of good and bad teachers on my own learning.
In a lecture by a good teacher I thought, "Yes, yes, I understand." Then I went home and found that I didn't understand as well as I thought and needed to do some work.
In a lecture by a bad teacher I thought, "I don't understand. In fact, this seems to be all wrong." Then I went home and had to do some work to find out what, if anything, was wrong.
In either case, I found the most important factor was my own struggle, alone, with many good books at hand.${}^\dagger$
A good teacher is like a good guide on a trek. He/she is sure-footed, knows the landscape, takes you to the scenic views, points out the dangers, and gets you to your destination. However, your guide will not carry you. You are the one that must take in the views and put one foot in front of the other. And very soon you will be traveling this region without your guide, so you'd better remember the lay of the land!
One last remark on "good" and "bad" teachers. I found it useful as a student to give my professors the benefit of the doubt---I recommend trying to remain agnostic about how "bad" a teacher is. Ultimately, you must own the material and no matter how "good" your teacher is, he/she can't do it for you. (In fact, a "good" teacher may lull you into thinking that you understand something you don't.) Your teacher knows much more than you and is trying to instill that knowledge as best he/she can. If your teacher is covering the material and not making too many wrong statements he/she isn't half bad.
To succeed at university, you should know your goals (degrees, research projects, what happens after graduation, etc.) as well as the obstacles that you must navigate (university rules, etc.) to achieve those goals. A good advisor helps you to come up with a realistic set of appropriate goals and to navigate the obstacles, and may even give you a well-timed kick in the seat. An advisor can be moderately to very important depending on the person.
I wish you luck in your studies.
${}^\dagger$ This struggle is often more successful and enjoyable with fellow students. And, of course, make good use of your teacher's office hours and whatever other educational services are available at your school. Lastly, consider becoming a tutor yourself. You will be exposed to different ways of thinking about a subject and will uncover holes in your understanding that you will be strongly motivated to patch up.