The property you're referring to is usually called integrity. In general, TLS uses one of two approaches for this.
The first approach, which is new in TLS 1.2, is called an AEAD (authenticated encryption with associated data) cipher. This type of cipher both encrypts the data and generates an authentication tag that the remote side can used to verify the integrity of the data. In TLS, the most common ciphers that are used this way are AES-GCM and ChaCha20-Poly1305, with AES-CCM used less frequently.
The older approach is to use HMAC in conjunction with an independent cipher. As part of the generation of session keys, an additional set of MAC keys is generated to be used with HMAC. TLS authenticates the plaintext and then encrypts the plaintext and MAC, instead of encrypting the data and then authenticating the ciphertext. The former approach means that a variety of timing attacks on padding and MAC verification can be exploited if the implementer is not exceptionally careful. The latter approach, called Encrypt-then-MAC, is preferred in the cryptographic community because it avoids those problems, but is not commonly used in TLS for historical reasons. TLS 1.3 no longer permits this mechanism because of the potential for timing attacks.
In all cases, the data authenticated is similar, and includes the sequence number (and in DTLS, the epoch), headers, and data. Authenticating this additional data, including the sequence number, prevents an attacker from replaying packets and is a best practice for cryptographic protocols.