Terraform is HashiCorp's declarative Infrastructure as Code (IaC) tool. You describe the end state in configuration files, and Terraform works out the steps, where imperative tools make you script each step. Since version 1.6 its license is the Business Source License, which is source-available, not open source.
Compared with other IaC tools, three things stand out:
It is provider-agnostic. One workflow manages AWS, Azure, Google Cloud and many other services, while CloudFormation is AWS's own tool for AWS resources.
A state file maps the configuration to the real resources.
terraform plan previews each change before terraform apply makes it.
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.