Normally a league is a collection of people, countries, or groups that combine for a particular purpose, typically mutual protection or cooperation. The most common examples may a.) The League of Nations and b.) a league of sports clubs that play each other.
An alliance is a pact, coalition or friendship between two or more parties, made in order to advance common goals and to secure common interests. It is a political agreement between countries to support each other in disputes with other countries.
Both of these words are very similar when it comes to countries trying to unite for a common goal, or when talking about teams/groups. I can understand why it is a bit confusing. Usually an alliance would be between 2 or more countries (or groups) while a league would be a larger group of countries (or groups).