TITLE: Flips in the Minimal Model Program
QUESTION [25 upvotes]: In order get a minimal model for a given a variety $X$, we can carry out a sequence of contractions $X\rightarrow X_1\ldots \rightarrow X_n$ in such a way that that every map contracts some curves on which the canonical divisor $K_{X_j}$ is negative.
Here we have, at least, the following technical problem: in contracting curves, the resulting variety $X_j$ might have become singular. In order to fix this issue, people consider a flip.
Here are my questions. What is the intuition to understand such a flip?
Are there examples of such things in other contexts of math or is it an ad hoc construction?

REPLY [10 votes]: This is a comment to Charles's answer, but I need more room than what comments allow.
"Glue back differently" means that the curve is "glued back" with its normal bundle "reversed". 
There is also an algebraic way to think about flips: If $f:X\to Y$ is a contraction, then $X$ can be considered as ${\rm Proj}_Y\sum_{m=0}^\infty f_*\mathcal O_X(-mK_X)$. Now if $f$ is small, then the flip of $f$ is given by the morphism $f^+: X^+={\rm Proj}_Y\sum_{m=0}^\infty f_*\mathcal O_X(mK_X)\to Y$. So, to prove the existence of a flip you "only" need to prove that the above algebra is finitely generated over $\mathcal O_Y$.
This might not seem an intuitive way right away, but remember that Proj comes with a relatively ample divisor, so what's happening is that we make an $f$-anti-ample divisor into an $f^+$-ample one without changing it on the locus where $f$ was an isomorphism. If $X$ and $Y$ are $3$-dimensional and $f$ is a small Mori-contraction then it contracts a single rational curve and being ample is equivalent to the degree of the divisor on the curve being positive. Now the (anti-)ampleness of the canonical class is then governed by the normal bundle of the curve and hence "flipping" the positivity of $K_X$ on this curve is essentially the same as "flipping" the normal bundle.