CID embedding works by attaching the images to the email as MIME (Multipurpose Internet Mail Extensions) parts. Each image is given a unique content ID (CID), which is then referenced in the HTML of the email. For example, an image tag in the HTML might look like this: <img src="cid:image1@example.com" alt="Example Image"> This tag tells the email client to display the image with the specified CID, which is attached to the email.