PIDs work by associating a unique identifier with a particular resource. This identifier is registered with a PID service, which maintains a database of identifiers and their associated metadata. When someone uses a PID to access a resource, the PID service redirects them to the current location of the resource. This ensures that even if the resource is moved or its URL changes, the PID remains a stable reference point.