A Content Identifier or CID is a label that is formed using a unique string of letters and numbers (known as a cryptographic hash) to represent content like pictures, videos or other files on the IPFS network.
Whenever a piece of data like a PNG image file is uploaded to IPFS, a unique content identifier is generated that is directly tied to the file on the IPFS network and cannot be altered without altering the content itself.
A CID can only ever refer to one piece of content, which means the file will be permanently linked to that CID.
Anyone will be able to retrieve a copy of the PNG file on IPFS just like how anyone can retrieve a record of a confirmed transaction on a public blockchain.
CIDs on the IPFS network make it possible for any piece content linked to an NFT to also be preserved on the blockchain, which ensures that it cannot be erased or altered.
The following is an example of an CID that is embedded into an IPFS Uniform Resource Identifier or URI (similar to a URL link for websites) -
This immutable link can also be included in the metadata of the NFT, ensuring that the content file is permanently connected to that NFT.