Suppose that $\omega_1,\omega_2\in\mathbb{C}$ with $\Im\omega_1/\omega_2>0$. Then consider the lattice $\Lambda=\mathbb{Z}\omega_1+\mathbb{Z}\omega_2$. We can form a torus as $\mathbb{C}/\Lambda$. We call meromorphic functions on $\mathbb{C}/\Lambda$ elliptic functions with respect to $\Lambda$.

Now suppose that $f(u;\omega_1,\omega_2)$ is an elliptic function with the additional property that we can almost scale the arguments: $f(\lambda u;\lambda\omega_1,\lambda_2)=\lambda^{-k} f(u;\omega_1,\omega_2)$ for $\lambda\in\mathbb{C}\setminus\{0\}$. Then in particular we can scale $\omega_2$ to 1: $f(u;\omega_1,\omega_2)=\omega_2^{-k}f\left(\frac{u}{\omega_2};\frac{\omega_1}{\omega_2}\right)$, where now $f(v;z)$ is defined on $\mathbb{C}\times\mathbb{H}$. If we fix $v$ and consider $f$ as a function on $\mathbb{H}$, then we have $f(v;\gamma z)=(cz+d)^k f(v;z)$ for any $\gamma\in SL_2(\mathbb{Z})$. (If $\gamma=\begin{pmatrix} a & b \\ c & d\end{pmatrix}\in SL_2(\mathbb{Z})$, then we define $\gamma z=\frac{az+b}{cz+d}$.)

We call a function $f:\mathbb{H}\to\mathbb{C}$ satisfying $f(\gamma z)=(cz+d)^k f(z)$ for all $\gamma\in SL_2(\mathbb{Z})$ a modular function.

The point of all that is the elliptic functions can be naturally turned into modular functions.