This lesson shows how to set up public and private subnets in AWS. First, a VPC is created. Then, two subnets are made: one public with a route to the Internet Gateway, and one private without. EC2 instances launched in the public subnet can access the internet directly. Those in the private subnet cannot. To allow private subnet instances internet access, a NAT Gateway is added in the public subnet. The private subnet's route table is updated to send internet traffic through the NAT Gateway. This setup keeps private resources secure while allowing them to reach the internet when needed.