How is it possible for the assistant referee to realize when a player is offside or not? If the assistant referee is in line with the last forward how can he see when the ball leaves the other player if he is so far from the last forward? Watching the replays, it seems impossible to make the right decision on difficult offside calls.
When the ball is in play, the assistant referee will do their best to remain in line with whichever one of
is closest to the goal line (p.86 - FIFA 2014/15 Laws of The Game).
They will generally side-step, only running facing the goal line when required to do so to keep up (p.86, p. 95 - FIFA 2014/15 Laws of The Game). This enables them to have a view of the offside line, the ball, the referee and the majority of the players at once. By occasionally placing their chin on their chest, they can use the touch line to gauge whether they are remaining square with the offside line.
When it appears that an attacker is going to play a ball and other attackers are close to being offside, the assistant referee will focus on the offside line and use their peripheral vision to judge when the ball is last played.
This is what makes it such a difficult job, and why I can't understand why sometimes people are so harsh on linesmen when the decision is tight.
The linesman's optimal place is in-line with the second last defending player. From here he will be able to judge the hardest part of his decision, the placement of the attacker.
He will then have to use his best judgement from peripheral vision and other factors as to when the ball was passed.
Further to previous, the assistant referee remains level with the second rearmost defender for the majority of the time. He/she will only leave this position if the ball is further forward than the second last defender ie. the ball has travelled beyond the defence/attack and is going to the goalkeeper. They do this in case the ball travels over the goalline and therefore they need to be level to see it has crossed completely over the line. However, as I say for the majority of the time they will stay level with the second rearmost defender. This is because this is the optimum position for judging offsides.
If the assistant is level with the second rearmost and an attacking player is to the right of them, then this attacking player is in an offside position. Then dependant on the other criteria of Law 11, the assistant will decide whether to raise the flag and indicate offside. It is important to understand that it is not an offence to be in an offside position. It only becomes an offence when they recieve the ball or interfere with an opponent etc. There will be numerous times during a game when the assistant will 'keep the flag down' allowing play to continue because even though the player is offside, an offence is not being committed
As for how and when to judge offside, studro makes a great point that the body position of the assistant is so important. By being square on to the field of play they have a great view of when the ball is played and also the line of players in front of him. Very little head movement is required as it where.
The difficulty comes when the ball is on the same side as the assistant just a bit further down the line from him. The assistant is then required to turn his head left to watch the player about to kick the ball and also across the field to study the offside line. Add into this the assistant is watching for any fouling, and the ball crossing the line for a throw in, even a quick glance away from across the field of play (ie. away from the second last defender) can cause you to suddenly be not level any more. As per previous responses, listening for the ball being kicked is useful and it is surprising that even in grounds with many thousands of people you can still hear the thud of the kick. A trick used in the english game is for the other assistant or referee to help the assistant by using the communication kit and tell him that the ball has been played forward. This means the assistant can keep watching the line and know the ball has been played forward. Additionally the assistant will do similar on a throw in deep in the referees half. Rather than have the referee watch the throw (and take his eyes away from the players), he can watch the players and the assistant will say "In play". This means should the referee notice any pushing, if he blows his whistle, he will know if the ball was in play or not. If the ball was in play he would need to award a freekick. If not in play then he could say "calm down fellas" before allowing the throw in.