I am trying to gain a better understanding of the notion of fibre products of schemes. Two major applications that I've began to study are:
1) Making an $S$-scheme $X$ into an $S'$-scheme via a morphism $S' \rightarrow S$, and
2) Obtaining the notion of a fibre: For a point $p$ of $S$, the canonical morphism $\operatorname{Spec}k(p) \rightarrow S$ induces the scheme $\operatorname{Spec}k(p) \times_S X$ over $\operatorname{Spec}k(p)$ whose underlying topological space coincides with the fibre over $p$.
What is the effect of base change on the fibres? Say, I have $f: X \rightarrow S$, $g: S' \rightarrow S$ and $p \in S, p' \in g^{-1}(p)$. Denote $X' = X \times_S S'$ and let $f': X' \rightarrow S'$ be the base change of $f$. Then there are two fibres
$\begin{align} f^{-1}(p) &= \operatorname{Spec}k(p) \times_S X\\ f'^{-1}(p') &= \operatorname{Spec}k(p') \times_{S'} X' \end{align}$
and there is an induced morphism $\operatorname{Spec}k(p') \times_{S'} X' \rightarrow \operatorname{Spec}k(p) \times_S X$ by the universal property of the fibre product. Will this be an isomorphism in general, or at least in certain cases? I am mostly curious about what happens if $g$ is a nonconstant map of smooth curves over $k$.