Overview
In rugby football, the offside rule prohibits players from gaining an advantage from being too far forward. The specifics of the rule differ between the two major codes.
Rugby union
Offside laws in rugby union are complex. However the basic principle is simple: a player may not derive any advantage from being in front of the ball.
When the ball is carried by a single player in open play, any other player on the same team who is in front of the ball carrier is in an offside position. When the ball is in a ruck, maul, scrum or line-out, any player who is in front of the hindmost foot of the hindmost player of the same side in the ruck/maul/scrum/lineout is in an offside position. When the ball is in a scrum, the scrum-half must remain behind the ball and all other players not in the scrum must remain behind a line parallel to the goal-line and five metres behind the hindmost foot. A player in an offside position is forbidden from interfering with play in any way. In particular, a player in an offside position
may not receive a pass (forward passes are illegal in any event)
may not enter a ruck, maul or scrum
may not play the ball
may not move towards the ball
may not move towards, tackle or obstruct a player of the opposing team who has the ball, or who is waiting to receive the ball
must move at least 10 metres away from any opponent who is waiting to receive the ball
Infringement of any of these rules is generally punished with a penalty awarded to the opposing team. The opposing team may choose instead a scrum at the location where the offending team last played the ball. However, if the infringement was accidental (e.g. a player receives a forward pass without intending to be in an offside position) then a scrum is awarded at the location of infringement.
From Wikipedia (CC BY-SA 4.0).