Cache tags are metadata that get associated with a cached object which enables very targeted flushing of content. The tags are generally returned in a custom HTTP Header, which a CDN is configured to read, so the information can be stored alongside the page/resource.
Modern CMS's, eg Magento 2, Drupal 8/9, Typo3, are adopting cache tags to provide built in support for Full Page Caching. For example, Magento 2 will list any products and categories that are on a page in the cache tags. eg:
Then, if a category is updated in the Magento admin, eg category ID 43, Magento issues a flush request to the cache with the tag
The CDN can then look up all pages that have that tag and invalidate them. Without cache tags it would be up to Magento to determine which urls category 43 appeared on, and then issue a flush request for every URL. This would be a very database intensive effort and result in unnecessary flushes, as not every page would be in the cache.
Cache tags are an elegant way of providing targeted cache invalidation.