It's very simple
You just replace the URL that you want to place in your ad with a 'tracking' URL which the ad tracking program will give you.
Let's have an example.
Suppose you want to run an ad campaign by placing an ad in the ABC newsletter for a product at your web page http://www.yoursite.com
You first decide on a special code unique to this campaign, in this case a code "ABC" would be suitable.
Then you just tell the ad tracking program to provide you with the tracking URL for http://www.yoursite.com with a code ABC
As simple as that, you just feed in 2 pieces of information. (The beauty of ad tracker programs is that you can set these up in seconds).
The system then provides you with a new URL - a tracking URL - and this is the one that you place in the ad.
So now when someone reads that ad and clicks on the new URL they will be taken to http://www.yoursite.com and the ad tracking system will register that the click came from the ABC newsletter.
At the basic level an ad tracking program records when your URL has been clicked. It can detect where your visitor came from (the referring URL), the browser and operating system and the exact time. It can record total hits and unique hits (i.e. where one visitor may click several times)
This data is kept in the system so you can then pull off reports on any ad campaign over any period e.g. by month, day or even by hour.
You can go online at any time and view your stats, which will be immediately up to date. If someone clicked on your ad just a second ago this information will already be available in the system.