I need to show that if $X$ is a covering space of $Y$ with the covering map $p$ and $Y$ is connected, then $p^{-1}(y)$ have the same cardinality for every $y\in Y$.
I have this hint: A function $f:W\to Z$ is locally constant iff each $w\in W$ has an open neighbourhood $U$ such that $f\restriction_U$ is constant. Show that any locally constant function is continuous.
I've also found a solution which I didn't understand: Let $k$ be a cardinality. Denote those $y$'s by $B_k$ for which $|p^{-1}(y)|=k$. By the "local triviality" (now I absolutely don't know what does that mean, perhaps it has something to do with the hint I found somewhere else), every $B_k$ is open. But they are also closed at the same time because they are all complements of unions of open sets. Since $Y$ is connected, there is a $k$ such that $Y=B_k$.
If you can explain the meaning of "local triviality" and its connection with the hint and also the hint itself I would be very thankful.