AWS Ops Work is an application management service that simplifies software configuration, application deployment, scaling, and monitoring. It is an orchestration tool like Chef. Opsworks is used to specify the state that you want your network to be in by specifying the state that you want each resource - server instances, applications, storage - that you want that resource to be in. And you specify the state that you want each resource to be in by specifying the value that you want for each attribute of the state.
CloudFormation is a json template that specifies the state of the resource(s) that you want to deploy i.e. you want to deploy an AWS EC2 micro t2 instance in us-east-1 as part of VPC 192.168.1.0/24. In the case of an EC2 instance, you can specify what should run on that resource through your custom bash script in the user-data section of the EC2 resource. CloudFormation is just a template. The template gets fleshed out as a running resource only if you run it either through the AWS Management Console for CloudFormation or if you run the aws cli command for Cloudformation i.e. aws cloudformation