How are the National League and American League in baseball determined?

toot