The “who” is very important in choosing your recommender. There are a lot of factors that should be taken into consideration. The most important one is how well this person knows you. The person you choose should have taught you in the last two years of high school. It should be someone who knew you well either through your class, or ideally through other activities you did that were mutual with that teacher. You should pick someone who you know writes well and has a good relationship with you. It is best to know that the person has some experiences that they can share about you.
You should always ask in person. It is best to find a non-busy time in their schedule to sit down and talk to them about where you are applying and when you need it by. You should send email reminders so that it does not get lost in their perpetually long list of things to do. Some teachers appreciate a resume and a list of schools you are applying to, so that they can better frame the recommendation. If there are any special forms they need to fill out, you should give those to them at this time as well.
It is best to ask early in your senior year or even the end of the junior year of high school. The earlier you ask the better the letter will turn out in the end. This is because the more letters the teacher has already written, the more tired they will be by the time they get to your letter. If you think that a certain teacher already has a lot of letters to write before yours, it is a good idea to choose a different teacher, for your sake and theirs.