Transport Layer Security (TLS), is the protocol used to secure HTTP traffic. This protocol is based on public key cryptography to authenticate peers in a connection, and on symmetric cryptography to cipher the content. The authentication relies on root certificate authorities that are known by HTTP client libraries. Historically, using a certificate recognized by web browsers and libraries was a paid-for service, like registering DNS domains.
However, since 2014, Let's Encrypt (https://letsencrypt.org/) allows us to get TLS certificates easily, automatically, and at no charge.