If you think that person may not know you very well, make an appointment to discuss your plans. Your choice among teachers will be wider. Let's suppose you have a few contacts who fit those criteria. The person's academic rank, scholarship standing, and length of service are also important factors. But if you could get strong recommendations from both tenured and non-tenured faculty, it is better for you to choose the person whose reputation is more established.
Some applications also require personal or character recommendations.
Find someone who knows you well outside the classroom, can fill in details about you that your teachers cannot, and will speak highly of your character. People you've worked with in a job, in a social or civic organization, neighborhood group, church group, etc. As well, people with a background in education or who are well-regarded figures in the community who just happen to have known you for a long time also make good character reference sources. Think of any school principals, professors, elected officials, business owners, etc. who know you well and would possibly recommend you. Lastly, consider that your recommenders should speak to different aspects of who you are.