In football, the offside rule is a fundamental law that prevents players from gaining an unfair advantage over the opposing team. According to Law 11 of the Laws of the Game, a player is in an offside position if any part of their head, body, or feet is nearer to the opponents' goal line than both the ball and the second-last opponent at the moment the ball is played to them. However, being in an offside position is not an offense in itself. It only becomes an offense if the player is involved in active play by interfering with an opponent or gaining an advantage from their position. There are certain exceptions to the offside rule, such as when a player receives the ball directly from a goal kick, a throw-in, or a corner kick