In the case $n=1$, $k[X]$ is a PID, so irreducible elements are prime and primes are either zero are maximal. So $k[X]/(p)$ is either $k[X]$ or a field.
In the case $n=2$, take the polynomial $y^3 - x^2$. You can check that it is irreducible in $k[X,Y]$, and that the quotient is isomorphic as such: $k[X,Y]/(y^3-x^2) \cong k[X^2,X^3]$. But in the second ring, $X^2$ and $X^3$ are irreducible and not associate, but $X^6 = X^2 X^2 X^2 = X^3 X^3$ has two factorizations. This is because in the parlance of lattices, if we look at the look the lattice of the positive integers by divisibility, we have removed the meet of $2$ and $3$.
For the case $n>2$, we can just take the ring $k[X_1,...X_n]/(X_2^3-X_1^2)$, where we have simply adjoined more indeterminates, and the same factorization problem remains. So it is not a UFD.