I read this notion from Atiyah-Macdonald exercise 3.21:
$f:A\to B$ is a ring homomorphism. $f^*:\operatorname{spec}(B)\to \operatorname{spec}(A)$ is a mapping induced by $f$ and defined by $f^*(q):=f^{-1}(q)$ for $q \in \operatorname{Spec}(B)$. If $p$ is a prime ideal of $A$, deduce that the subspace $f^{*-1}(p)$ of $\operatorname{Spec}(B)$ is naturally homeomorphic to $\operatorname{Spec}(B_p/pB_p)=\operatorname{spec}(k(p)\otimes_AB)$, where $k(p)$ is the residue field of the local ring $A_p$
I have already proved that $f^{*-1}(p)$ is homeomorphic to $\operatorname{Spec}(B_p/pB_p)$. Let $S=A-p$, I can also get that \begin{equation} \begin{aligned} B_p/pB_p&\cong A_p/p_p \otimes_{A_p} B_p\\ &\cong S^{-1}(A/p \otimes_A B)\\ &\cong A_p \otimes_A(A/p \otimes_A B)\\ &\cong (A_p \otimes_A A/p)\otimes_A B\\ &\cong A_p/p_p \otimes_A B. \end{aligned} \end{equation} What makes confused is that $k(p)\otimes_A B$ is just an $A$-modula while $\operatorname{Spec}(k(p)\otimes_A B)$ is defined by the set of all prime ideals of $k(p)\otimes_A B$. I don't know what ring structure should $k(p)\otimes_A B$ take here. Besides, when we take it as a ring, can we say that $k(p)\otimes_A B \cong B_p/pB_p$ because they are isomorphic as $A$-modula?