Tracking on your site can be either done server-side or remotely.
With server-side statistics, log files are used to generate visitor information. This is usually much more accurate than remotely hosted solutions. In such cases, you usually have to add some javascript to your site. This javascript is then used to track visitor data.