To be offside, in football is an offence which will result in an indirect free kick for the opposition team. It is in essence when 1 player is further up the pitch than more than 10 of the other teams players, when the ball is passed to him.
A player is in an offside position if:
He is nearer to the opposition's goal than both the ball and the second last opponent, when the ball is passed to him from a teammate.
It is not an offence if the ball comes directly from:
A goal kick
If the player is caught offside, the referee will award an indirect free-kick to the opposing team, from where the player was caught offside.
The red number 10 above, is now offside, as there is only the goalkeeper ahead, this means that there is only one player ahead of him (there must be at least 2) and he is therefore offside. The defenders may have moved forward to play what is called, "the offside trap".
The red number 9 in this example however, is onside. This is because he has the blue number 3 and the blue goalkeeper ahead of him, meaning that he has two opposition players closer to the opposition's goal. This may have been a failed offside trap.
Why the offside rule is in existence
The offside rule is used in soccer to stop what the picture above demonstrates, goalhanging. This is where a player will stand next to the opposition goalkeeper, in the hope that a player from his team will kick it to him to score. This would obviously make a very boring game!
Although the above picture shows that one blue defender is further up than the red number 9. He is still offside as there is only one player ahead of the him, the goalkeeper is for some reason up the pitch. This may be for a last-minute corner in the FA cup and he can't get back in time, however, if the red's use the same tactics as before, they will be offside. They have to make sure there are two players ahead of them.
Why linesmen may get an offside wrong!
Although we may ask, and blame, linesmen why they get an offside decision wrong, it is not always their fault believe it or not! It is all to do with "line of sight". In the picture below, the purple line represents the linesman's line of sight, which as you can see, is at a slight angle. This line should be parallel with the goal line. So even though the red number 10 is being played onside by the blue number 2, it will be called offside by the linesman. This is unfortunate because it does happen from time to time!