I am learning Lagrange's theorem and I understand this theorem but I want to know the inverse of that. If a group $G$ with $|G| = mn$ where $n,m$ are two integers, then will the group $G$ has two subgroups $G_1,G_2$ with the order of $G_1,G_2$ are $n$ and $m$? Especially, will the group $G$ has the cyclic groups with the order $n$ and $m$?
Asking for cyclic subgroup $G_1$ and $G_2$ is way too much (apply this to $n=|G|$, $m=1$ and you have proved that $G$ is cyclic, whatever might be the group $G$).
Even if we forget the 'cyclic' assumption on $G_1$ and $G_2$, it is not true. There is no subgroup of order $30$ inside $A_5$ (direct permutations over $5$ elements) for example.
To expand a little on the topic of "converse to Lagrange's theorem". The most general converse to Lagrange's theorem is the following. If some power of a prime number $q$ divides $|G|$ then there exists a subgroup of order $q$ inside $G$. This is basically the content of the first Sylow's theorem. When $q$ is a prime number, the theorem is known as Cauchy's theorem and has a much lighter proof than first Sylow's theorem.
In addition to your question: there is a class of finite groups known as CLT groups, where CLT stands for Converse Lagrange Theorem:
$G$ is a CLT group if for each positive integer $d$ dividing $|G|$, $G$ has at least one subgroup of order $d$.
These groups have been studied extensively. It turns out for example that all supersolvable groups are CLT, and all CLT groups are solvable. See also one of the early papers of Henry G. Bray, Pac. J. Math 27 (1968). All $p$-groups, or in general nilpotent groups, are supersolvable.