An invasion is a play made inside an enemy extension or framework with the intention of living, escaping, or sacrificing.  By living or escaping, the invader deny the opponent of large territory, and may attack one or both of his stones.
See also Invasion Itinerary.
Invasions occur throughout the game.
- In the opening they are probably part of standardised joseki.
- In the middle game they may be middlegame joseki, follow-ups in well-known positions, or just as likely occur as one player exerts the power of influence built up in an earlier fight.
- In the endgame they can be considered as 'gouging' tactics (Japanese eguri?).
The difference between the second and third cases is that invasions in the middle game phase may create weak groups; which have no place in the endgame, where everything in theory is already settled in status and there is nowhere much to run.
A number of middlegame joseki exist for invasions into simple extensions and positions resulting from common "regular" (opening) joseki, but choosing the best point to invade often requires a fair bit of reading and positional analysis.
- Invasion Professional Example 1
- Invasion Professional Example 2
- Invasion Professional Example 3
- Invasion Professional Example 4
- Invasion Professional Example 5
- Invasion Professional Example 6
Nick Sibicky 4d has a video lecture on invasions which was useful to me (13k):
 Must the intention be to live or run out? What about invading with the idea of possibly sacrificing the invading stone depending on the defender's response? togo: Either of one or both, doesn't matter. Sacrifice is always a possibility and would sacrifice what you have, in this case an invasion with the prospect of living on its own, or running out.
GreenAsJade - if it's a sacrifice in enemy territory to get a response, then isn't that a probe, not an invasion. That might be the difference: invasion _does_ intend to live...
Bill: Nope. Sacrificial invasions are not uncommon.