Why is n mod 0 undefined? I tried to find out what $n$ mod $0$ is, for some $n\in \mathbb{Z}$. Apparently it is an undefined operation - why?

I might say it depends on how you define what it means to mod out by a number.
A typical first way of thinking about mods is to say that $a \equiv b \pmod d$ if $a = b + dk$ for some integer $k$. In this sense, there is nothing wrong with saying $a \equiv b \pmod 0$, although this says nothing more than $a = b$.
A different first way of thinking about mods is to say that $a \equiv b \pmod d$ if when you divide $a$ by $d$, you get remainder $b$ (or something very similar). In this sense, as it does not make sense to divide by $0$, we are at a loss.
A typical higher idea is to consider $\mathbb{Z}$ as a group, and for the 'mod by $d$' operation to mean the equivalence classes induced by taking cosets of the subgroup generated by $d$, which I'll denote by $\langle d \rangle$. In this sense, the subgroup $\langle 0 \rangle$ is the trivial subgroup, so modding out by $0$ falls more along the lines of the first way of thinking I mentioned above : it's well-defined, but not really useful.
