In football you are offside if you don't have at least two players ahead of you (usually, but not necessarily the keeper and one defender)
A player is in an offside position if:
-
any part of the head, body or feet is in the opponents’ half (excluding the halfway line) and
-
any part of the head, body or feet is nearer to the opponents’ goal line than both the ball and the second-last opponent