Basically if there are 2 players attacking and one of em passes the ball onto the other player, the player who receives the ball should be behind the last defender or it will be an offside. That is why players dont just stand near the goalpost because itll result in an offside