Say we have a commutative ring $A$, an $A$-module $M$, and an ideal $\mathfrak{a}$ in $A$.
Then we have the short exact sequence:
$$ 0 \to \mathfrak{a} \hookrightarrow A \twoheadrightarrow A/\mathfrak{a} \to 0 $$
After tensoring with $M$ we're left with the exact sequence:
$\mathfrak{a} \otimes_A M \rightarrow A \otimes_A M \twoheadrightarrow A/\mathfrak{a} \otimes_A M \to 0$.
We know that $A \otimes_A M \simeq M$ and so $A \otimes_A M /\ker \pi \simeq A/\mathfrak{a} \otimes_A M$. Where $\pi$ is the surjection in the last sequence.
$\ker \pi = \{ \sum a_i \otimes m_i : \sum \pi(a_i) \otimes m_i = 0 \}$, so how do I conclude that $\ker \pi \simeq \mathfrak{a}M$?