Tracking pixels function by embedding a small, often invisible image into an email. When the recipient opens the email, the image is loaded from the server, which can then record various details like the time of the opening, the recipient's IP address, and the type of device used.