Basically where it crossed the line.
Wrong.
- If it's kicked out from a kick-off, it's supposed to be a choice to the non-kicking team (but normally the ref will call a scrum back on halfway regardless). Opposition Scrum or Lineout.
- If it's a penalty kick, it's wherever the ball crosses the touchline (provided the ball isn't kicked dead). Kicking teams lineout.
- A penalty kick can take place from Kickoff if an infringement has taken place during the passage of a scores which didn't affect play proceeding (usually off the ball violent conduct). This is effectively a penalty so the same rules apply if they opt for touch rather then the points. Kicking team lineout.
- If the opposition carries the ball into the attacking 22 and get turned over, the clearance kick can be kicked directly into touch from the 22 and the lineout will take place where the ball crossed the line. Opposition Lineout.
- If the ball is cleared from outside the 22 (or carried back into the 22 by the defending side) and the ball does NOT bounce before going out, the the opposition lineout takes place level where the ball was kicked from.
- If the above scenario happens but the ball DOES bounce first, the opposition lineout takes place where the ball crossed the line.
SO:
If it's a penalty, it's your own throw in wherever the ball crosses the line provided your team didn't touch the ball between the kick and finding touch.
If it's free kick/open play, it's opposition lineout, but where depends on where you are positioned, who carried the ball to that position, if anyone touched the ball in it's flight path and if the ball bounced before finding touch.