The way they used to do it was to embed a one pixel image in the email. The server storing the image can tell when the image is loaded.
I did some more research and gmail now uses an intermediary server to send the image back. So there’s another layer of protection that makes it more difficult for the sender to discover your location.
How would it tell the difference between a user opening the message and, say, a spam filter like SpamAssassin doing it?