Mike-e-ey is right:
In 2005 The International Football Association Board agreed a new Decision in Law 11 that being 'nearer to his opponent's goal line' meant that "any part of his head, body or feet is nearer to his opponents' goal line than both the ball and the second last opponent. The arms are not included in this definition." [1] This is taken to mean that any part of the attacking player named in this Decision 2 has to be past the part of the second last defender closest to his goal line (excluding the arms) or past the part of the ball closest to the defenders' goal line.
In general, what this means is that either the attacking team should ensure the opposing team has at least two players (of which the opposition's goalkeeper is included) in between the goal line and the nearest player of the attacking team, or all players of the attacking team should be behind the ball such that it remains closer to the goal line than any of the player of the attacking team. If the goalkeeper is ahead of the play, then the forward will have to be in line with or behind two defenders (considering they are not in their own half).