PKCS#7 padding
A way to fill out the last block so that the original length can always be recovered.
Block ciphers work on fixed-size blocks, 16 bytes for AES, so a message whose length is not an exact multiple has to be padded. PKCS#7 appends N bytes, each with the value N. Even a message that already fits exactly gets a full block of padding, so the receiver can always read the last byte and strip the right number of bytes. The format is described in RFC 5652.
The weakness is that the padding can be tampered with. If an attacker can tell whether a ciphertext decrypts to valid padding, they can sometimes recover the plaintext one byte at a time. That is the basis of padding oracle attacks.