I'm learning about de Jong's theory of resolution of singularities and the following fact is used numerous times: an alteration of varieties $h: X \rightarrow Y$ factors as $X \xrightarrow{\pi} Z \xrightarrow{f} Y$, where $\pi$ is a modification and $f$ is a finite morphism. From an exercise in Hartshorne I know I can find a dense open subset in $U \subset Y$ such that the induced morphism $h^{-1}(U) \rightarrow U$ is finite, but I don't know where to go from there. I thought to blow-up the respective closed sets away from these open subsets, but then I'd be moving away from my original varieties. I get the sense this is a known fact. Anyone know a simple proof?



Alterations factor as modification + finite map
As Sandor points out, this is Stein factorization. 
Let $X$, $Y$ be varieties over a field $K$. Let $h: X\to Y$ be a proper morphism. Then
$h\_\*(O\_X)$ is coherent and
$Y':=Spec(h\_\*(O\_X))$ (cf. EGA II.1.3 for the definition of $Spec$ of a sheaf of quasicoherent algebras) is finite over $Y$. Consider the Stein factorization
$$h:X\buildrel h' \over\longrightarrow Y'\buildrel g\over \longrightarrow Y$$
of $h$. (It is true by Zariski's connectedness theorem (cf. EGA III.4.3.1 - III.4.3.4) that
$h'$ has non-empty geometrically connected fibres and $g$ is finite, but this will not be 
needed here). 


Now assume that $h$ is an alteration, i.e. that $h$ is surjective and that there exists a nonempty open subscheme
$U\subset Y$ such that $h^{-1}(U)\to U$ is finite. Replacing $U$ by a smaller set we may assume that $U=Spec(A)$ is affine. Define $U'=g^{-1}(U)$ and $V=h^{-1}(U)$. Then $V=Spec(B)$ for some $A$-algebra $B$, because $h$ is affine as a finite morphism.
We thus have $h\_\*(O\_X)(U)=B$. Hence it follows from the definition of the sheaf Spec that
$U'=Spec(B)$ and the restriction $h': V\to U'$ is an isomorphism. Hence $h': X\to Y$ is a modification. 


Note that this argumentation does not use the full strength of Zariski's connectedness theorem in an essential way here. Most of the things are in a sense "a tautology".
The only somewhat deeper fact entering is the fact that 
$h\_\*(O\_X)$ is coherent, because of the properness assumption. 


Concerning your comment, the following is clearly true: 
If $f: X\to Y$ is a finite morphism and $f\_\*(O\_X)=O\_Y$, then $f$ is an isomorphism.


