Eric's answer deals well with the domains of functions, but I wanted to add an answer more specifically about $0/0$. $0/0$ is undefined, not because it is nothing, but because it could be anything. Remember, division is the reverse of multiplication. So, when we say, for instance, $8 / 2$, what we are asking for is the number, when multiplied by $2$, will yield $8$.
So, for $0/0$, we are asking for the number, when multiplied by zero, will be zero. Well, that's any number. That is why it is undefined. Not that there is necessarily no answer, but because, when you have a zero multiplier, it destroys all the information that used to be there, so you can't reverse the process. In fact, this was one of the reasons why zero was not originally a number. Since you could not divide by it, they thought it couldn't actually be a number.
Anyway, even though $0/0$ is generally nonsense (because it could mean anything), you actually can use some tools to figure out what it is supposed to mean in some particular case. In calculus, we call these "limits". What you can do is, rather than put in $-1$ for $x$, put in a number that is infinitely close to $-1$. Let us use $\epsilon$ as a value that is infinitely small, an infinitesimal. Therefore, let us substitute in $(-1 + \epsilon)$ in for $x$ and see what jumps out:
$$
\frac{x^2 + 3x + 2}{x + 1} \\
=\frac{(-1 + \epsilon)^2 + 3(-1 + \epsilon) + 2}{(-1 + \epsilon) + 1} \\
=\frac{1 + -2\epsilon + \epsilon^2 + -3 + 3\epsilon + 2}{\epsilon} \\
=\frac{\epsilon^2 + \epsilon}{\epsilon} \\
=\frac{\epsilon(\epsilon + 1)}{\epsilon} \\
=\epsilon + 1
$$
So, what is $\epsilon + 1$? Since $\epsilon$ is an infinitely small value, $\epsilon + 1$ is infinitely close to $1$. In other words, when $x$ is infinitely close to $-1$, the result is infinitely close to $1$. A technical way of saying this is "the limit as $x$ approaches $-1$ is $1$." This technique works well for smooth, continuous functions.
So, in summary, the reason why $0/0$ is undefined is that it could be any value - it is not possible to tell what the value should be just using the formula as-is. However, by pushing the formula an infinitely small amount one way or another, we can see what the value should be in our particular version of $0/0$.