  In an earlier paper Buczolich, Elekes and the author described the Hausdorff
dimension of the level sets of a generic real-valued continuous function (in
the sense of Baire category) defined on a compact metric space $K$. Later on,
the author extended the theory for maps from $K$ to $\mathbb{R}^n$. The main
goal of this paper is to generalize the relevant results for topological and
packing dimensions.
  Let $K$ be a compact metric space and let us denote by $C(K,\mathbb{R}^n)$
the set of continuous maps from $K$ to $\mathbb{R}^n$ endowed with the maximum
norm. Let $\dim_{*}$ be one of the topological dimension $\dim_T$, the
Hausdorff dimension $\dim_H$, or the packing dimension $\dim_P$. Define
$$d_{*}^n(K)=\inf\{\dim_{*}(K\setminus F): F\subset K \textrm{ is
$\sigma$-compact with } \dim_T F<n\}.$$ We prove that $d^n_{*}(K)$ is the right
notion to describe the dimensions of the fibers of a generic continuous map
$f\in C(K,\mathbb{R}^n)$. In particular, we show that $\sup\{\dim_{*}f^{-1}(y):
y\in \mathbb{R}^n\} =d^n_{*}(K)$ provided that $\dim_T K\geq n$, otherwise
every fiber is finite. Proving the above theorem for packing dimension requires
entirely new ideas. Moreover, we show that the supremum is attained on the left
hand side of the above equation.
  Assume $\dim_T K\geq n$. If $K$ is sufficiently homogeneous, then we can say
much more. For example, we prove that $\dim_{*}f^{-1}(y)=d^n_{*}(K)$ for a
generic $f\in C(K,\mathbb{R}^n)$ for all $y\in \textrm{int} f(K)$ if and only
if $d^n_{*}(U)=d^n_{*}(K)$ or $\dim_T U<n$ for all open sets $U\subset K$. This
is new even if $n=1$ and $\dim_{*}=\dim_H$. It is known that for a generic
$f\in C(K,\mathbb{R}^n)$ the interior of $f(K)$ is not empty. We augment the
above characterization by showing that $\dim_T \partial f(K)=\dim_H \partial
f(K)=n-1$ for a generic $f\in C(K,\mathbb{R}^n)$.
