The Shulhan Aruch, in Siman 648:16, discusses the Halacha of spots on an Etrog. The top portion of the Etrog, sloping down from the Pitam to where it gets wide, is the crucial area. If there is even one black spot in this area, the Etrog is Pasul.
However, only spots noticeable from a cursory glance are problematic. If they cannot be detected when holding the Etrog at "book- reading distance," there is no concern. Also, only spots detected on the first look are problematic. If he only noticed them on his second glance, there is no problem. Scrutinizing the Etrog up close or with a magnifying glass is a Humra.
Only spots on the flesh of the Etrog are problematic. This includes the "neck" of the Pitam, and therefore that should also be checked. However, spots on the "Shoshanta"-the wooden part of the Pitam are not problematic, since that is not considered an integral part of the Etrog.
Brown and red spots are not problematic. Black spots originating from an external source, e.g. pesticides, are also not problematic. These can sometimes actually be removed by experts. Only black spots that are an inherent part of the Etrog render it invalid.
The Shulhan Aruch also discusses an Etrog with "Hazzazit"-which is some type of disease akin to boils. The Aruch Hashulhan (Rav Yechiel Michel Epstein of Nevarduk, 1829-1908) writes that this blemish is rare and is not found in today’s Etrogim, and is not a concern.