How a JWT is put together
A signed JWT is three base64url segments joined by dots: a header, a payload and a signature. The header is JSON naming the algorithm in alg and often a type in typ and a key ID in kid. The payload, which RFC 7519 calls the claims set, is a JSON object of claims such as sub, aud and exp. The signature is computed over the exact ASCII text of the first two segments and the dot between them, so changing a single character of either breaks it.
Base64url is the URL-safe form of base64: "-" and "_" replace "+" and "/", and the "=" padding is dropped (RFC 7515). Every header starts with "eyJ", which is simply the encoding of {", and that is a quick way to recognise a JWT in a log or a request.
An encrypted token, a JWE under RFC 7516, has five segments instead: a protected header, an encrypted key, an initialisation vector, the ciphertext and an authentication tag. Only its header can be read without the decryption key.