OpenID Connect discovery (/.well-known/openid-configuration) and OAuth authorization server metadata (RFC 8414) publish the URL as jwks_uri; the set contains every key currently valid for verification, each with a kid. Verifiers cache the set, select the key whose kid matches the token header, check that the key's kty and alg fit the expected algorithm, and refetch on an unknown kid, with rate limiting.
Rotation works by adding the new key before signing with it and removing the old one only after all tokens signed with it have expired. Failures to watch for: private members (d) published by mistake, duplicate kid values, keys without alg that a lax library uses with the wrong algorithm, and caches that never refresh. The JWKS checker audits a live endpoint for these problems.