There are a number of fundamental technologies that are used by measurement systems to collect visitor data. Here are a few of the most common:
Log files analysis
The original method for site stats reporting is by processing system log files that record all the requests made by visitors accessing the site via a browser. These log files can become large and need to be compressed and ultimately deleted to save server space. Also report generation is processor intensive and has to re rerun if any changes to the reports are required. This along with accuracy issues resulting from ISP and browser caching means that this approach is now less popular than it once was.
Systems like Hitwise use data captured by ISPs to product market centric reports. These reports are based on a large sample size and can report on all sites as logs or page tagging is not required. The only short coming is that exact visitor numbers can only be roughly estimated and so market share (%) is often used to rank sites against each other.