You are offside if, the moment the pass is played, you are in the opponents' half and nearer their goal line than both the ball and the second-last opponent. It is only called once you get involved.
No rule causes more shouting on a Sunday morning, mostly because two things get confused: the position and the offence. What counts is only the moment your team-mate plays the ball, not the moment you receive it. If you are level when the pass leaves his foot and only then set off, you are onside — even if you collect the ball well behind the back line. In your own half you can never be offside anyway. And being in an offside position is not punishable by itself: the whistle comes when you actually get involved, meaning you play the ball, obstruct an opponent or gain an advantage from it. The classic amateur mistake is starting too early from a standstill. Take the run from deep and on a curve instead: full speed, but from a legal position. Odd fact for converts: futsal and beach soccer have no offside at all — there a forward may camp up front all game.