Overall, visibility is the distance at which objects may be discerned.
Does this definition take into account the size of the objects? Obviously large objects can be seen from farther away than small ones.
The FAA gives the definition for "Flight Visibility" in 14 CFR 1.1:
Flight visibility means the average forward horizontal distance, from the cockpit of an aircraft in flight, at which prominent unlighted objects may be seen and identified by day and prominent lighted objects may be seen and identified by night.
According to that definition, any mountain, geographical feature, structure, road, or other object could qualify for day visibility measurements, regardless of size. To identify the object in a way that is meaningful for measuring visibility, the object must be identified to a degree that the distance can be positively identified. If I see a mountain and positively identify it as a mountain that is at 150 NM distance, I can correctly state that I have at least 150 NM of flight visibility. Likewise, if I see a windmill and positively identify it as a windmill that is at 1 NM distance, I can correctly state that I have at least 1 NM of flight visibility.
The FAA also gives the definition for "Ground Visibility" in 14 CFR 1.1:
Ground visibility means prevailing horizontal visibility near the earth's surface as reported by the United States National Weather Service or an accredited observer.
The term "prevailing horizontal visibility" is indefinite as seen here, so additional clarification is needed. In this case, that clarification is provided by the National Weather Service itself:
Prevailing visibility is the value reported in non-automated surface observations. A human observer determines it by identifying objects and landmarks at known distances in a full 360 degree circle around the observation point. The greatest visibility observed over 50% or more of the 360 degree area is the prevailing visibility. If there is a sector of the 360 degree area that is significantly different from the prevailing visibility, the system may add a remark reflecting that difference. Pilots must realize, however, that nearly half the area around an airport may have lower conditions than the reported prevailing visibility.
Automated visibility sensors—such as those used with the Automated Weather Observing System (AWOS)—do not measure visibility over a distance. Instead, these systems sample a very small area for clarity of the air and use an algorithm to convert this value to a usable representative visibility value. For more information on these systems see the National Weather Service's Visibility Page.