Most modern artifacts are content addressed. A Docker image is a manifest that lists layers, and each layer is identified by a SHA256 digest of its contents. When you push an image, the client uploads only the layers the registry does not already have, then uploads a small manifest pointing at them. Because layers are deduplicated by digest, ten images built on the same base layer store that base only once.
Tags like v1.4.0 or latest are mutable pointers to an immutable digest. The digest never changes once content is stored, which is why production systems often pin to a digest (image@sha256:abc...) instead of a tag, so a rebuild of latest cannot silently change what runs.
Registries expose a standard HTTP API. The OCI distribution spec defines endpoints for blobs and manifests; Maven uses plain GET and PUT over HTTP; npm uses its own JSON metadata format. The registry layers access control, quotas, and retention on top: who can push to a repo, how many old versions to keep, and which artifacts to garbage collect once nothing references them.
Many registries also run as proxy caches. You point npm or pip at the registry, and on a cache miss it fetches from the public source, stores a copy, and serves it. The next build pulls from the local cache, which protects you from a public package being deleted or going offline.