First, the League of Nations was not set up in World War II, the League of Nations was established by the Treaty of Versailles at the end of World War I. It was the only one of Woodrow Wilson's points adopted by the treaty, and despite being Woodrow Wilson's brainchild, the USA was not a member.
The purpose of the League of Nations was essentially the same as the United Nations; to prevent massive wars between multiple nations by providing a forum for negotiations that could be moderated by any neutral party. Unfortunately, the League had no enforcement mechanisms, which meant any decision the League made was non-binding. As fascist leaders grew more aggressive in the 1930s, the League could do little more than verbally condemn the aggression.