Perhaps this will aid your intuition.
Consider this rational map from a smooth curve to a projective space:
$$ f: \mathbb A^1 -\!\! \rightarrow\mathbb P^1, \ \ f(t) = [t:1/t^2] $$
At first glance, it looks like $f$ is not regular at $t = 0$. But that is an illusion. Clearing denominators, you see that $f$ can be rewritten as
$$ f(t) = [t^3:1]$$
which is manifestly regular.
So what is the algebraic property that makes the "clearing denominators" trick work? It's fact that the local ring on $\mathbb A^1$ at $t = 0$ is a discrete valuation ring. In this example, $t$ has valuation $1$ and $1/t^2$ has valuation $-2$ in the local ring, so the denominators are cleared by multiplying by $t^2$ which has valuation $+2$.
How does this generalise when you have a rational map
$$ f: X -\!\! \rightarrow \mathbb P^n $$
where $X$ is smooth, but of arbitrary dimension? Well, the local rings of $X$ in codimension 1 are discrete valuation rings. Using the same trick of "clearing denominators", you see that $f$ is regular everwhere except on a codimension 2 subspace of $X$. But as MooS points out, you can't do better than this - consider the blow up of a surface.