How to understand fibres of morphisms of schemes. Let $f:X\to Y$ be a morphism of schemes, and let $k(y)$ to be the residue field of the point $y$. The fibre of the morphism $f$ over the point $y$ is defined to be the scheme $X_y=X\times Spec(k(y))$.
It's said that $X_y$ is homeomorphic to $f^{-1}(y)$. If we consider affine schemes, then the point $y$ corresponds to a prime ideal $p$ in $\mathcal{O}_y$, then $f^{-1}(y)$ should correspond to a prime ideal $q$ in $\mathcal{O}_x$, which is a point. But sometimes $f^{-1}(y)$ can be more than one point, so I am not sure what $X_y$ looks like.
Besides, it seems that if $H$ is a subscheme of $Y$, then $f^{-1}(H)$ can be regarded as $X\times H$. I hope someone can show me a clear picture. Thanks!

The question is of a local nature so let's assume $X=Spec(B)$ and $Y=Spec (A)$ are affine schemes. Then $f: Spec$ $ B\rightarrow Spec$ $A$ corresponds to a ring homomorphism $ g: A \rightarrow B$ . Let $y$ correspond to the prime ideal $p$ in $A$ . Then $X_y= X \times_{ Y} Spec (k(y)) = Spec ( B \otimes_A \frac { A_p}{pA_p}) $. Suppose $g^{-1}(q)=p$ where $q\in Spec(B)$ Then $A \rightarrow B \rightarrow B_q$ factors uniquely through $A_p \rightarrow B_q$ and hence we have a unique ring homomorphism from $ B \otimes _A A_p/pA_p \rightarrow B_q/qB_q$ which is surjective and $B_q/qB_q$ is a field Thus $\exists ! z\in X_y $ which is the image of the point  $Spec (B_q/qB_q)$ . 
Now back to geometry.
Consider the commutative diagram 
$\require{AMScd}
\begin{CD}
X_y@>{}>> Spec (k(y));\\
@VVV @VVV \\
X@>{}>> Y;
\end{CD}
  $
The maps are all continuous and follow from properties of fibre product. $\pi_1(X_y) \subset f^{-1} (y)$ following commutativity. And the algebra above shows it is a bijection. So you have got a continuous bijection. 
