An ACME client such as certbot, acme.sh, Caddy or Traefik proves control of the domain to the CA. With HTTP-01 it places a file under /.well-known/acme-challenge/ that the CA fetches over port 80. With DNS-01 it creates a TXT record _acme-challenge, which also allows wildcard certificates.
Let's Encrypt certificates are valid for 90 days, so renewal must run automatically, via a systemd timer or cron, including a reload of the web server, which otherwise keeps serving the old certificate.
Common reasons for failed renewals: port 80 blocked by a firewall, a redirect that catches /.well-known/, a CAA record that does not allow the CA, or rate limits after too many failed attempts.
Example
certbot renew --dry-run