A league is a structure under which a group of teams who compete against each other for an annual championship. A distinction is usually made between the major leagues, which represent the highest level of competition available, and various minor leagues, whose quality of play is lower. Independent leagues are another type of non-major leagues. There are also winter leagues, and various foreign leagues.
Teams are not necessarily confined to playing games against other members of their leagues only. In the major leagues, interleague play between teams in the National League and the American League has been a feature since the 1997 season. Interleague play has also happened at various times in minor leagues and independent leagues. Teams may also play exhibition games which do not count towards the league championship.
The first relatively structured professional league was the National Association, which began play in 1871. The strongest amateur clubs soon joined it and other leagues which formed afterwards, placing almost all teams within leagues. Before that, there were professional and amateur teams who played games and issued challenges to each other to claim various championships, but the concept of a group of teams playing a set schedule mainly among themselves to lead to the designation of a champion was not firmly established. Certain teams continued to exist outside league structures after the first leagues were formed, but these were usually barnstorming teams, who moved from location to location taking on whatever local team was willing to play them.
A league usually has a President, an authority figure who is there to adjudicate disputes and make rulings, and a secretary, whose role is to put together the schedule of games and collate their results. In Major League Baseball, the Commissioner's office now fulfills both roles, since the suppression of the two offices of league President in 1999.
In college baseball, there are no leagues but "conferences" which serve a similar purpose. There are also "summer collegiate leagues", which accommodate college players who are not playing for their schools but for teams formed into leagues.