The exceptional set is defined for every birational morphism $\pi : Y \to X$. This is defined as follows. Set $\Sigma \subset X$ to be the smallest closed subset of $X$ outside of which $\pi : (Y \setminus \pi^{-1}(\Sigma)) \to (X \setminus \Sigma)$ is an isomorphism.
In this case the exceptional set is defined to be $$E = \pi^{-1}(\Sigma).$$ Now, $\Sigma$ itself is just a set, and not a scheme, so often people will give $E$ the reduced scheme structure and consider it as a closed subscheme of $Y$.
Negative result: In many applications (perhaps even most), $E$ is actually a divisor. Indeed, if you obtained $\pi : Y \to X$ by blowing up $\Sigma$, and say $X$ is a normal variety with $\Sigma \subseteq X$ a codimension $\geq 2$ subset, then $E$ is indeed a divisor.
There are many examples when $E$ is not a divisor.
The most common example is probably the following. $$X = V(xy - uv) \subseteq \mathbb{A}^4.$$ Note $X$ has dimension 3.
In this case, consider blowing up the ideal $(x,u) \subseteq O_X$. I'm not going to do this for you, but it is a good exercise. In this case, the blowup gives you a resolution of singularities of $X$, but the exceptional set is 1-dimensional.
Positive result: If $X$ is smooth (or even factorial) and $\pi : Y \to X$ is birational with $Y$ quasi-projective, then the exceptional set is always a divisor. Sándor explains this quite nicely in THIS QUESTION.
Positive result #2: If you are willing to change your variety $Y$ by taking a further blow-up, then you can always turn the exceptional set into a divisor. For example, simply take $\rho : Y' \to Y$ to be the (normalized) blow up of $E$.