Does Terraform uses AWS cloudformation under the hood?

Yea but does it use the resource api directly or use Cloudformation API to create the resource?

For example if I use terraform to create an EC2 instance, does it interact with EC2 API or Cloudformation API to create the EC2 instance?