The word VPC stands for virtual private cloud. In the Amazon cloud, any resources that wish to communicate with each other (eg EC2, RDS) need to be under the same VPC. If the VPC is connected to the Internet via an Internet Gateway, the resources can also communicate via the Internet.
Example of VPC with daily usage:
In our home network, we have multiple devices connected to the home network. If two devices in our home network want to connect, they need to be connected to the same network. We cannot connect to the neighbor’s devices because they are on a different network.
The same rule is true for a VPC. Any resources that wish to communicate with each other (such as EC2, RDS) need to be on the same VPC.