BGP is consists of two flavors, these two flavors are as follows:
External BGP : used between autonomous systems
Internal BGP : used within the autonomous system.
External BGP is to exchange routing information between the different autonomous systems. In this lesson I explain why we need internal BGP. I would recommend to read it after finishing this lesson and learning about external BGP first.