What is the best way to ask for recommendation letters?

I'm a pretty quiet kid and I don't really participate in any of my classes. I know this is kind of a huge problem and it's beginning to worry me. What if come next year I don't feel comfortable asking any teachers for recommendations? Does anyone have any tips for me (a junior) while I still have some time to fix this?

First, think about who is most likely to give you a solid recommendation. Which subjects do you like best? Do you feel more comfortable around a certain teacher? Once you have a couple of class/teacher combos picked out based on these criteria, you can begin to put additional effort into participating in class and demonstrating interest in the material. If you go above and beyond in your assignments and show your teacher that you respect them and care about learning, that alone can be enough to nail down a good recommendation.

You should still make more of an effort to participate, but you don't need to be overly aggressive. It's sometimes helpful to make a rule for yourself and hold yourself to it. For example, decide that you're going to answer one question in class at least every other day. Your teacher will see that you're making an effort to get outside of your comfort zone for the sake of a better learning experience, and he or she will appreciate that.

Finally, if you believe you could benefit from extra help in any of the classes where you're thinking of asking for a recommendation, don't hesitate to ask. Again, this will show your teacher that you're a conscientious student and you place a high value on your education.

Source: Personal experience - I was a shy kid in high school who didn't get all buddy-buddy with my teachers, but I still ended up with great recommendations because teachers knew I took their classes seriously and cared about the subjects.