You may be tempted to ask a well-known teacher, but if that teacher doesn't know you well, the letter won't mean a lot. You should also avoid teachers that you had several years ago.
Don't ask a family member or a friend for a recommendation as a college may not take them seriously. You should always follow the guidelines from the colleges you are applying to when choosing who to write your letter of recommendation. Finally, if you have a teacher that doesn't have the best opinion of you, avoid asking them for a recommendation letter.