Points, goal difference, promotion and relegation — the mechanics behind domestic league competitions.