BGP is an external routing protocol used between autonomous systems to exchange routing and reachability information. It uses path vector attributes and autonomous system numbers to prevent routing loops and make routing decisions based on attributes like local preference, weight, and MED. BGP configuration involves enabling BGP on the router, establishing neighbor relationships, defining networks to advertise, and controlling path selection using attributes and route maps.