They (usually the Nielsen company) have monitoring devices installed in a certain number of homes. They measure what those homes are watching relative to what the other monitored homes are watching - assuming they've sampled the right "mix" of people, they can fairly accurately extrapolate from those measurements what the wider American audiences are watching.
... Or, the cable providers can just provide the information on what everyone is watching.
I watch him 'cuz I think he's a jerk....so a lot of people (like me) watching isn't necessarily a good thing. Gee...I missed him on the view...will I survive??
I DON'T WATCH THE VIEW.
Do you personally know a "Nielsen Family"?
I don't.