Think of AWS Security groups as bodyguards around an influential figure protecting the main character from any physical harm and look for making his visit to any place safe and secure. Just like this, the AWS Security group is a virtual firewall that you could set up for your instance to handle and manage inbound and outbound traffic.
And as a like bodyguard, that figure controls who to keep, how to keep and he/she could take associated decisions. Similarly, you could set up different rules and regulations for your security groups that too even separately for both inbound and outbound traffic.
If you are wishing to get certified in AWS, then I would recommend you to take up an AWS certification course from Intellipaat, which focuses on building your practical skills through guided projects and exercises. Check out our YouTube video on AWS services to get started.