Soccer Rules - Offside
It is not an offence in itself to be in an offside position.
A player is in an offside position if:
He is nearer to his opponents’ goal line than both the ball and the second last opponent.
A player is not in an offside position if:
He is in his own half of the field of play.
Or he is level with the second last opponent
Or he is level with the last two opponents
There is no offside offence if a player receives the ball directly from:
A goal kick
Or a throw-in
Or a corner kick
For any offside offence, the referee awards an indirect free kick to the opposing team to be taken from the place where the infringement occurred.
A player in an offside position is only penalised if, at the moment the ball touches or is played by one of his team, he is, in the opinion of the referee, involved in active play by:
Interfering with play.
Or interfering with an opponent.
Or gaining an advantage by being in that position.