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?



Flips in the Minimal Model Program
I am also just learning this stuff, and I'm partly writing this out for my own benefit. Experts, please correct and up/down vote as appropriate!


The goal of the minimal model program is to give a standard, nonsingular, representative for each birational class of algebraic variety. As stated, this goal is too ambitious, but it will help us to understand the minimal model program if we think of it as a partially successful attempt at this goal.


Let $X$ be a compact, smooth algebraic variety of dimension $n$. Let $\omega$ be the top wedge power of the holomorphic cotangent bundle. Then the vector space, $V:=H^0(X, \omega)$, of holomorphic $n$-forms on $X$ is a birational invariant of $X$. This means that we should be able to see $V$ from just the field of meromorphic functions on $X$; here is a [sketch](https://mathoverflow.net/questions/152/how-do-you-see-the-genus-of-a-curve-just-looking-at-its-function-field/345#345) of how to do that. So we get a rational map $X \to \mathbb{P}(V^{\\*})$ by the standard recipe. More generally, we can replace $\mathbb{P}(V)$ with Proj of the ring $\bigoplus H^0(X, \omega^{\otimes n})$. This is called the canonical ring; you may have heard of the recent breakthrough in proving that the canonical ring is finitely generated. We can map $X$ rationally to this Proj; the image is called the log model. This is a partial success: it is a canonical, birational construction, but it may not be birational to $X$ and may not be smooth.


There are certain well understood rules of thumb for how various subobjects of $X$ behave in the log model. For example, if $X$ is a surface and $C$ a curve with negative self intersection, then $C$ will be blown down in the log model. 


Here is a more complicated example, which is relevant to your question. Let $Y$ be some variety that locally looks like the cone on the Segre embedding of $\mathbb{P}^1 \times \mathbb{P}^1$. So $Y$ is a $3$-fold with an isolated singularity. If you are familiar with the toric1 picture, it looks like the tip of a square pyramid. Inside $Y$, let $Z$ be the cone on one of the $\mathbb{P}^1$'s. This is a surface, but not a Cartier divisor. Let $X$ be $Y$ blown up along $Z$; so that the isolated singularity becomes a line. In the toric picture, the point of the pyramid has lengthened into a line segment, and two of the faces which used to touch at the point now border along an entire edge. In the log model, the line will blow back down to become a point. So the log model can turn a smooth variety, like $X$, into a singular one like $Y$.


Now, birational geometers did not rest on their laurels when they had constructed the log model. They made other constructions, which are smoother but less canonical. Many of these constructions can be thought of as taking the log model and modifying it in some way. If the log model looks like the example of the previous paragraph, they want to take the singular point of $Y$ and replace it by a line, to look like $X$. But they have two ways they can do this; they can blow up one $\mathbb{P}^1$ or the other; giving either $X$ or $X'$. Often, replacing $X$ by $X'$ is crucial in order to improve the model somewhere else. The relationship between $X$ and $X'$ is called a flip, because we take the line inside $X$ and flip it around to point in a different direction.


1 Cautionary note: although the toric picture is excellent for visualizing what is going on locally, you shouldn't take $X$ itself to be a toric variety. There are no global sections of $\omega$ on a toric variety, so the log model is empty. You want $X$ to locally look like a toric variety, but have global geometry which is nontoric in a way that creates lots of sections of $\omega$.


