When you have an image on your webpage, the surfer's browser will send some information to the webserver hosting the image (to request that image). This request looks like:
GET /track.gif?subid=testid HTTP/1.0
Connection: Keep-Alive
User-Agent: Mozilla/4.01 [en] (Win95; I)
Host: www.mypixeltracker.com
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Accept-Language: en
Accept-Charset: iso-8859-1,*,utf-8
If your file track.gif on your site is a PHP script instead of a GIF image, you can record the information that is send in the request (including the subid parameter and the ip of the surfer) and still output a valid 1x1 px image.
I hope that answers your question.