A throw-in is awarded when the whole ball crosses the touch line (conceded by the team who last touched the ball). It is delivered off the field of play with both hands and from behind and over the deliverer's head. Otherwise it is deemed to be a 'foul throw' and a throw-in is given to the opposition. It cannot go direct to the goalkeeper's hands (if on the same team) and you cannot score directly from a throw-in.
Goal kick
Awarded once the whole ball crosses the goal line if it last touched an opposition player. The ball is kicked from anywhere in the goal area outfield, but must cross the penalty area line.