Let $f : A \rightarrow B$ morphism of rings.
There is something I am confused about if M is an A-module. I am little bit confused about when we consider $B \otimes M$ as either A module or B module. When we consider $B \otimes M$ as A module. Do we consider the tensor as tensor in A ? That is, do we write $B \otimes_A M$ ? If we consider $B \otimes M$ as B module do we consider the tensor $B \otimes_B M$ ? Or is it just $B \otimes_A M$ where we can either put an A module structure on this or a B module strcuture on this ?
First of all, note that the morphism $f:A \to B$ allows us to view the ring $B$ as an $A$ module with the multiplication $$ ab := f(a)b $$ Moreover, any $B$-module $N$ may be regarded as an $A$-module with the similarly defined $an := f(a)n$. This is sometimes called a restriction of scalars.
My attempt to answer your question: $M \otimes_A N$ is necessarily a tensor product of $A$-modules, and $M \otimes_B N$ is necessarily a tensor product of $B$-modules. Given the above morphism, any $B$-module may be regarded as an $A$ module, but an $A$-module cannot necessarily be considered as a $B$-module.
If $N$ is an $A$-module (but not a $B$-module), then $B \otimes_B N$ makes no sense, since we have no "scalar" multiplication defined between elements of $b$ and elements of $N$. However, $B \otimes_A N$ is fine, since $B$ is an $A$-module.
If $N$ is a $B$-module, then $B \otimes N$ is ambiguous; it could be either $B \otimes_B N$ or $B \otimes_A N$. In that case, some more context is required.
Then again, $B \otimes_B N \cong N$, so it is unlikely that $B \otimes N$ would refer to the former case.