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 $h': V\to U'$ is an isomorphism. Hence $h'$ 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.