Suppose you have elements $a$ and $b$ of order $2$ and $3$ respectively. The six elements $a^rb^s: 0\le r \le 1, 0\le s\le 2$ are all distinct. If you then know which of these six elements is $ba$ then all the products are determined (by use of associativity).
If $ba=ab$ then the group is abelian and hence cyclic.
If $ba=b^s$ then $a=b^{s-1}$ and this does not work ($a$ and $b$ would then commute as in the first case). Similarly if $ba=a$ then $b=1$ contrary to hypothesis.
The only other possibility is $ba=ab^2$ and this gives a second group of order $6$ which can be realised as the group of symmetries of an equilateral triangle (dihedral group) or the symmetric group on three objects - to prove that such a group exists.
Another way of doing this is by counting elements. If there is a single subgroup of order $2$ then it is normal and any element of order $3$ commutes with the single element of order $2$. This gives the cyclic group.
Since there are five non-identity elements and elements of order $3$ come in pairs, there are two elements of order $3$ and three elements of order $2$ each of which generates a subgroup of order $2$.
You can show that the group acts transitively and faithfully by conjugation on these three subgroups of order $2$, which gives an isomorphism with $S_3$.