I don't understand the following lines on p.108 (chapter 10) in Atiyah-Macdonald:
Since we have a natural homomorphism $f:A\to \hat{A}$ we can regard $\hat{A}$ as an $A$-algebra and so for any $A$-module $M$ we can form an $\hat{A}$-module $\hat{A}\otimes_A M$. It is natural to ask how this compares with the $\hat{A}$-module $\hat{M}$. Now the $A$-module homomorphism $g:M\to \hat{M}$ defines an $\hat{A}$-module homomorphism $$ \hat{A}\otimes_A M\to \hat{A}\otimes_A \hat{M}\to \hat{A}\otimes_\hat{A} \hat{M}=\hat{M}. $$
Well, we can define an $A$-module stucture on $\hat{A}$ in the following way: Let $\hat{a}\in\hat{A}$ and $a\in A$. Then define $a\cdot\hat{a}:=f(a)\,\hat{a}$. But why is the tensor product $\hat{A}\otimes_A M$ an $\hat{A}$-module? And how are the homomorphisms in the last line defined?