The term am ha'aretz has come to mean an ignorant Jew, and is generally used in a pejorative manner. However, in Talmudic literature, an ignorant Jew was referred to as the hebrew word bor, an empty pit; likely related to the English "boor". The great sage Hillel teaches that "a boor cannot be a fearful of sin" (Pirkei Avot 2:7). Without a solid foundation of knowledge, true fear of sin is impossible.
The description of the am ha'aretz in the Talmud referred to one who was not fully observant, most notably in the laws of purity and tithing. Many sages would be careful not to associate too closely with them, and the Gemara went so far as to disqualify their testimony in court of law (Pesachim 49b). We just cannot be certain of, nor rely on, their words.
In discussing the laws of birchat hamazon, the Talmud notes that one may not include an am ha'aretz in a mezuman. The Gemara then quotes a number of traits - in addition to carelessness about tithing and purity - that might render a person an am ha'aretz. The first opinion quoted, that of Rabbi Eliezer, is that an am ha'aretz is one who does not say the shema morning and evening; i.e., they do not accept the yoke of heaven and mitzvoth on a daily basis. This is followed, not surprisingly, by those who do not put on tefillin, tzitzit, or have a mezuzah on their door - all mitzvoth central to our recital of the shema. These are the meat and potatoes of mitzvoth between man and G-d, and nonobservance of them stigmatizes one as an am ha'aretz.
The Gemarah then quotes the opinion of Rav Natan the son of Yosef, who defines an am ha'aretz as "whoever has children and does not raise them to Torah study". Judaism is only as strong as the Jewish education we give our children.
The last view, that of "Acheireem", others, states that even one "who reads [Tanach] and learns [Talmud] but does not serve (honour) Torah scholars is an am ha'aretz". Whom a society honours tells us much about its core values and long-term viability. Is it athletes, movie stars, corporate giants? Or are scholars and those who advance knowledge our true heroes?
The Talmud concludes the discussion with the statement of Rav Hunah that "the law is like Acheireem".
All of this is true, in theory. If we are going to create a serious, learned, and committed religious community, we have to carefully monitor with whom we associate. Yet, in practice, such attitudes are no longer in the best interests of the Jewish community. Tosafot immediately notes that "nowadays (about 800 years ago), we are not meticulous [about this] and we include an am ha'aretz in our mezuman". Tosafot finds precedence for this in the Gemara itself, which quotes Rav Pappa as saying, "According to whom do we accept testimony today (about 1800 years ago) from an am ha'aretz? According to Rav Yossi...in order that each person not go and built an altar for themselves" (Chagigah 22a).
To divide Jews into learned and ignorant, more religious and less religious, would destroy the fabric of our people. And no matter how high one's standards, there will always be someone who thinks it is not good enough, "who builds an altar unto himself".
We are all one people, and must not make artificial (or even not so artificial) distinctions. This is the only way to enter into Yom Kippur, where the davening begins with the declaration, "With the approval of the Omnipresent and with the approval of the community, in the convocation of the Court above and in in the convocation of the Court below we sanction prayer with sinners". Only if we view others as no worse--and preferably better--than ourselves can we possibly hope for the fulfillment of our hope and prayer as we end Yom Kippur, "next year in a [rebuilt] Jerusalem".