Very long, relevant extract:
A player in an offside position at the moment the ball is played or touched* by a team-mate is only penalised on becoming involved in active play by:
- interfering with play by playing or touching a ball passed or touched by a team-mate or
- interfering with an opponent by:
- preventing an opponent from playing or being able to play the ball by clearly obstructing the opponent’s line of vision or
- challenging an opponent for the ball or
- clearly attempting to play a ball which is close when this action impacts on an opponent or
- making an obvious action which clearly impacts on the ability of an opponent to play the ball
*The first point of contact of the 'play' or 'touch' of the ball should be used
or
- gaining an advantage by playing the ball or interfering with an opponent when it has:
- rebounded or been deflected off the goalpost, crossbar or an opponent
- been deliberately saved by any opponent