Football is a pretty simple game. Whichever side scores the most goals wins the match.

Of course, there are a few rules to abide by but it's one of the easier sports to understand.

Perhaps the most complex law in football is the offside rule.

QUIZ: Can you name the footballer based on their Wikipedia page?

Newcomers into the sport may take a little bit of time to fully understand how offside works.

While the actual rule is always changing, you're currently offside if: "any part of the head, body or feet is in the opponents' half (excluding the halfway line) and. any part of the head, body or feet is nearer to the opponents' goal line than both the ball and the second-last opponent."

That 'second-last opponent' bit is the important part.

If you take the goalkeeper out of the equation and always assume he's the closest person to the goal, an attacking player can't be the 'wrong' side of the last defender when the ball is played.

Got that? Good.

But it's not always that simple.

When a goalkeeper is no longer the defending player closest to the goal line, then it becomes a bit trickier.

This rarely happens but there is one memorable instance of this happening during the 2010 World Cup in a match between Mexico and South Africa - and it was an incident that completely baffled the commentators.

A corner was swung in by Mexico and it was headed on by an attacking player as the South African goalkeeper, Itumeleng Khune, came out to punch the ball. At the moment the ball flicked off a Mexican player's header, Mexican forward Carlos Vela was closer to the goal line than the Khune. That, Steven Pienaar was a South African on the line complicated the situation as Vela scored for Mexico.

The assistant referee flagged it as offside but the commentator couldn't believe it.

"He's onside. There is a South African defender right on the goal line, surely," exclaimed the co-commentator, Efan Ekoku, alongside Martin Tyler.

"Well it can't be offside... see that again," Ekoku continued.

"How can it be offside? There is a defender on the line! What an awful decision!"

VIDEO: Commentator gets confused by offside rule during the World Cup

Oh dear.

As we should all know by now, as the goalkeeper came away from his goal line, he left Vela offside from the headed flick-on.

The goal was correctly disallowed for offside. In fact, the assistant referee deserves a lot of credit for his brilliant decision which came long before VAR was around.

HIT or MISS? Signing of the Season! Ranking Show (The Football Terrace)