The offside rule is the rule that has been changed the most in soccer since the first rules were written. Soccer teams used to have way more forwards than midfielders or defenders, but after many modifications to the rule that has changed. The offside rule is often one of the most confusing rules to those who are learning the game, hence why I am explaining it. While there is a deep history of the offside rule, I will be explaining the modern rule which can be found here.
The offside rule in soccer has to do with positioning. The offside rule applies when, at the time when the ball is played by one of his teammates, a player is in an offside position and then interferes with play, usually by receiving the pass. It is not against the rules to be in an offside position. It is only against the rules when you interfere with play after the ball was passed. A player is in an offside position when he is closer to his opponents’ goal line than the ball and two opponents. It is a misconception (or at least it was for me) that you have to be closer to the goal line than only one opponent. This is because a player is almost always behind the goalkeeper—so the biggest challenge is staying behind one defender. Some things to be aware of about the offside rule is that you are judged by when the ball is played, meaning when the teammate that is passing the ball’s foot is currently touching the ball, and not when you receive the pass. It is a common strategy to be onside when the ball is played, but then rush toward the goal to get behind the defenders and receive the pass (this requires teamwork, of course, because the player passing needs to know where the player receiving is going). This is sometimes called a run. Also, the offside rule doesn’t apply on a throw in or corner kick, or when the player is on his side of the field.
It is almost impossible to figure out the offside rule by watching a game on TV. But after you learn the rule it is actually quite simple. If you are still confused about the offside rule you can see the official rule in the link above. But I hope you now understand the modern offside rule in soccer.