(a) TOSFOS says that the Gemara is referring to an Am ha'Aretz who is a
known killer. Since it is a matter of Piku'ach Nefesh, it is permitted to
dispose of him even if he is not presently involved in a murder.
(b) The RAN and RABEINU DAVID, quoting RAV SHERIRAH GA'ON and the RIF say
that if the Am ha'Aretz is pursuing a betrothed woman (Rodef Achar
ha'Ervah), it is permitted to kill him, even on Yom Kippur, even if he can
only be stopped by stabbing him (i.e. an ugly death, Misah Menuveles).
The Rishonim ask that if this is the case that the Gemara is referring to
when it says that one may kill an Am ha'Aretz, then why is the Gemara
talking about an Am ha'Aretz? It is permitted to kill anyone, even a Talmid
Chacham, if he is Rodef Achar ha'Ervah! The answer is that granted, it would
be permitted to kill anyome who is Rodeh Achar ha'Ervah, but only someone
who is an Am ha'Aretz would be ignorant enough to do soAn Am ha'Aretz does
not think about the consequences of his actions and goes ahead and pursues
the woman where people can see him, and thus he is killed in any manner
during his act of being Rodef. As an Am ha'Aretz, he does not even know how
to sin.
(c) The RAN and MAHARSHA explain that the Gemara is speaking in metaphoric
terms. Since the Amei ha'Aretz hate the Talmidei Chachamim so much, the
Gemara uses exaggerated statements about them. The Maharsha adds that the
Metaphor for killing is that one is permitted to embarrass the Am ha'Aretz
in public, even on Yom Kippur (embarrassing a person is akin to killing him
-- Bava Metziah 58b).