I'm reading this paper on the univalence axiom and I'm stuck with the following definitions:
Maybe my thinking is still too much grounded in set theory, but let's say $f$ is the identity on $\{0,1\}$ (which should be an equivalence), wouldn't $f^{-1}(0)$, according to this definition, consist of $(0,\{\text{refl}(0)\})$ and $(1,\{\})$? How can those two elements be identified?

A canonical element of type $\Sigma (x : A), B(x)$ has the form $(a, b)$ with $a : A$ and $b : B(a)$.
You've written $(0, \{ \mathrm{refl}(0) \})$, but it should be $(0, \mathrm{refl}(0))$ instead. The type $f^{-1}(0)$ has no element of the form $(1, p)$, because otherwise $p$ would have to be an element of $\mathrm{Id}(1, 0)$, which is empty.