Besides doing well in the class (or even sometimes not doing well, but showing improvement over the quarter/semester), I found the easiest way to get to know a professor is to get to know their research. If it's at a big university im assuming they are required to do research. I would go to their office hours and in down time I would ask about it. On top of that, I would send quarterly, or bi-quarterly, updates to my professors wishing them happyholidays, etc. and letting them know about what i've been up to. Periodically, I would apply to smaller things such as small programs or scholarships and request letters for that to. So by the time I applied to dental school, my professors have already known me for a while and even had bits from other letters to work off.
It's pretty critical to keep updating your professors on your progress because if it has been years since you've talked to them, they will not remember all the great things about you, and even if they do write you a letter.... it can only be so strong.
And don't forget about your TAs, they can really help you get the foot in the door by recommending you for a letter. Not only that, if the professor is looking for more information about you to put in the letter - they will likely ask the TAs.