I'm not a soccer person and only have a vague sense of what the offside condition is for that sport. It would be helpful to have a reference, even just the text of the rule, for making close call decisions.
There's an entire Wikipedia article about it. https://en.wikipedia.org/wiki/Offside_(association_football)