Examples and further results about the order of the product of two elements in a group
Simple examples are given by free products, assuming you know the normal form for a free product; otherwise, I'm not really saying much.
If you want a more concrete example, take the $2\times 2$ matrices with coefficients in $\mathbb{Q}$, and $$a = \left(\begin{array}{cc}0&1\\1&0\end{array}\right),\qquad b=\left(\begin{array}{cc}0 & 2\\\frac{1}{2}& 0\end{array}\right).$$ Then $a^2=b^2=1$, but $$ab = \left(\begin{array}{cc}\frac{1}{2} & 0 \\0 & 2\end{array}\right)$$ has infinite order.
If $a$ and $b$ commute, with $\mathrm{ord}(a)=m$ and $\mathrm{ord}(b)=n$, then you can do better than Wikipedia. We have that: $$\frac{\mathrm{lcm}(m,n)}{\mathrm{gcd}(m,n)}\quad\text{divides}\quad \frac{\mathrm{lcm}(m,n)}{|\langle x\rangle\cap\langle y\rangle|}\quad\text{divides}\quad \mathrm{ord}(ab)\quad\text{divides}\quad \mathrm{lcm}(m,n).$$ For example, if for every prime $p$ that divides $\mathrm{lcm}(m,n)$, the highest power of $p$ that divides $m$ is different from the highest power of $p$ that divides $n$, then $\mathrm{ord}(ab)=\mathrm{lcm}(m,n)$.
If you are willing to impose global conditions (conditions on $G$), then for example Easterfield proved in 1940 that if $G$ is a $p$-group of class $c$, $a$ has order $p^{\alpha}$, and $b$ has order $p^{\beta}$, then the order of $ab$ is at most $p^m$, where $$ m = \max\left\{\alpha,\beta+\left\lfloor\frac{c-1}{p-1}\right\rfloor\right\}.$$ From this you can get similar results for a finite nilpotent group (which is necessarily a product of $p$-groups), and hence for the product of two elements of finite order in any nilpotent group (or in fact, in any locally nilpotent group, or even more strongly, in any group in which the 2-generated subgroups are nilpotent).
Product of two elements of infinite order = element of finite order?
Let $G$ be any group containing an element $a$ of infinite order. Then $a$ is clearly not the identity, $e$ of G, since $ord(e) = 1$, which is finite. Nor can $a$ be its own inverse, since that would mean $ord(a) = 2$, also finite.
So there must exist an element $b$ such that $b$ = $a^{-1},\; b \neq a,\;b \neq e$, since for every element $x \in G,\; x^{-1} \in G$, and it follows that $ord(a) = ord(a^{-1}) = ord(b)$. Hence $b$, like $a$, is of infinite order Now clearly, $a * b = a*a^{-1} = e \in G$, and, of course, the order of $e$ is finite. So we have if a set has an element of infinite order, it also has an element of finite order which is the product of two elements of infinite order.
Product of elements of finite order = element of infinite order?
Another even more concrete example of two elements of finite order, the product of which is of infinite order:
Take $G=GL_2(\mathbb{Z})$, and two elements $A$ and $B$ such that $$A = \left(\begin{array}{cc}-1&1\\0&1\end{array}\right),\qquad B=\left(\begin{array}{cc}-1 & 0\\ 0 & 1\end{array}\right).$$ $A$ and $B$ each have order 2, yet there product $AB$ is of infinite order: $$AB = \left(\begin{array}{cc}1&1\\0&1\end{array}\right)$$ To see this, note that $$(AB)^n = \left(\begin{array}{cc}1&n\\0&1\end{array}\right)$$ which is the identity matrix only for $n = 0$.
Also, the product $$BA = \left(\begin{array}{cc}1&-1\\0&1\end{array}\right) = (AB)^{-1}$$ has infinite order. So here again, you have $(AB), (AB)^{-1} \in GL_2(\mathbb{Z})$, both of infinite order, whose product is $I_{2x2}$, of finite order!
Here is a rephrasing of the question which I think aptly illustrates the value of thinking in terms of universal properties. Let $n, m$ be two positive integers. There is a group $C_n * C_m$, the free product of the cyclic groups $C_n, C_m$, with presentation $\langle a, b | a^n, b^m \rangle$. It satisfies the following universal property:
Let $G$ be a group with elements $g, h$ such that $g^n = h^m = 1$. Then there is a unique homomorphism $\phi : C_n * C_m \to G$ such that $\phi(a) = g, \phi(b) = h$.
Depending on how comfortable you are with presenting a group by generators and relations, this might be obvious. Nevertheless, the existence of the free product $C_n * C_m$ is helpful because it allows us to recast a question about an entire class of groups (the class of groups with an element of order $n$ and an element of order $m$) into a question about a single group:
Is it true that $(ab)^k = 1$ for some $k$ in $C_n * C_m$?
Note that there are only two possibilities: either $ab$ has order $k$ for some $k$, which means that $gh$ has order (dividing) $k$ in any group $G$ such that $g^n = 1, h^m = 1$, or $ab$ has infinite order. In particular, it is impossible for $gh$ to always have some finite but arbitrarily high order (since that would necessarily imply that $ab$ has infinite order). This is a special case of a very general theorem in first-order logic called the compactness theorem.
But now it should be intuitively obvious that $ab$ has infinite order. More explicitly, it should be intuitively obvious that the elements of $C_n * C_m$ are elements of the free group $F_2 = \langle a, b \rangle$ on $a, b$ such that $a, a^{-1}$ don't appear $n$ times in a row and $b, b^{-1}$ don't appear $m$ times in a row, with the obvious multiplication (cancel all of the obvious relations), and in this group there are no obvious relations to cancel in the word $(ab)^k$.
Of course, this is not a proof. (I believe it follows from standard properties of free groups, but what I've written is not a proof.) But what I'm trying to get at here is that you shouldn't need to see explicit examples to be convinced that this is intuitively true. Undoubtedly writing down explicit examples (nice quotients of $C_n * C_m$) is probably the easiest way to answer this particular question, but for more general questions about the group generated by two elements of finite order (for example, does $a b a^{-1} b a$ have infinite order in $C_n * C_m$?) it's good to be aware that there is a goal you should be aiming for: to understand the specific group $C_n * C_m$.
As far as writing down explicit examples, here now is a chance to illustrate the value of thinking in terms of representation theory in the general sense. Take two random matrices of orders $n$ and $m$. Their product should have infinite order with probability $1$; in fact, they should generate $C_n * C_m$ with probability $1$. An easy way to generate such matrices is just to conjugate a matrix which obviously has order $n$ or $m$ (for example an appropriate permutation) by a random matrix.
The value of doing this is that there are lots of easy-to-verify conditions which imply that a matrix has infinite order: for example, if it is a $d$-dimensional matrix with trace greater than $d$ in absolute value, then it must have infinite order (exercise). It is also surprisingly easy to guarantee that a $2 \times 2$ matrix has order $n > 2$: you just have to make sure that its characteristic polynomial is $x^2 - 2 \cos \frac{2\pi}{n} x + 1$, or equivalently that its determinant is $1$ and that its trace is $2 \cos \frac{2\pi}{n}$.
Let me illustrate with $n = m = 3$: we just need to find two matrices of determinant $1$ with trace $-1$ whose product has trace greater than $2$ in absolute value. In fact it's easy to generate families of such matrices: just take
$$A = \left[ \begin{array}{cc} a-1 & -(a^2-a+1) \\ 1 & -a \end{array} \right], B = \left[ \begin{array}{cc} b-1 & b^2-b+1 \\ -1 & -b \end{array} \right].$$
We compute that the trace of the product is $(a-1)(b-1) + (a^2 - a + 1) + (b^2 - b + 1) + ab$, which in particular is a large positive number as soon as $a, b$ themselves are large and positive. In fact all I had to do was guarantee that this wasn't a constant polynomial: any nonconstant polynomial takes on arbitrarily large values (exercise).
This same trick allows us to construct $2 \times 2$ matrices $A, B$ of orders $n, m$ such that their product has order $k$ for any triple $(n, m, k)$. The corresponding universal groups are called the von Dyck groups and are related to some interesting geometry.