The Offside Rule .
It is not an offence itself to be in an offside position as long as the ball is not played towards the player and they are not interfering with the play. The offside trap is enforced when a player is closer to the opposing goal line than the ball and the second last opponent. The referee and assistants must call offside and penalise a player if the ball is played to them and they are interfering with play, an opponent or gaining an advantage by being in the position. However, there is no offence if the player directly receives the ball from a goal kick, throw in or corner kick. Finally, the player cannot be offside if they are behind the last defender and the ball is played to them in their own half of the football field.
In a gaming situation the player would receive the ball in an offside position and the ball would be played over the top of the defensive line to reach them. The referee would then blow the whistle and call an indirect free kick in the place where the player received the ball. In this situation it means that the team awarded with the free kick cannot shoot from this set play, however can score after passing or crossing the ball. Another way that a player could fall into the offside trap in a match situation is when their body position is behind the last defensive player when a through ball is played.