The theorem:
Let $E_{1},E_{2}$ be elliptic curves and let $\ell\neq$char($K$) be a prime. Then then natural map $$\operatorname{Hom}(E_{1},E_{2})\otimes \mathbb{Z}_{\ell}\longrightarrow \operatorname{Hom}(T_{\ell}(E_{1}),T_{\ell}(E_2)),\quad \phi\mapsto\phi_\ell$$ is injective.
Here $T_{\ell}(E_{i})$ is the Tate module of the elliptic curve ${E_{i}}$. I don't understand how the tensor product is taken. I know that $\operatorname{Hom}(E_{1},E_{2})$ is a $\mathbb{Z}$-module. But in the theorem, is the tensor product taken as $\mathbb{Z}$-modules? If so why is it true that, $$rank_{\mathbb{Z}} \operatorname{Hom}(E_{1},E_{2})=rank_{\mathbb{Z}_{\ell}}\operatorname{Hom}(E_1,E_2)\otimes \mathbb{Z}_{\ell}$$ Is $\operatorname{Hom}(E_{1},E_{2})$ also a $\mathbb{Z}_{\ell}$-module? If so how.