Hello Po
Here are some links to resources that will help you understand the difference between IGPs such as OSPF and EIGRP, and EGPs such as BGP.
Some posts that will also help:
I hope this has been helpful!
Laz