What's the difference of a monoid and a group? I'm reading this book and it says that a group is a monoid with invertibility and this property is made to solve the equation $x \ast m=e$ and $m \ast x=e$ for $x$, where $m$ is any element of the structure.
I got confused because it's similar to the monoid's commutativity property which says that $m \ast n=n*m$ for all $m, n \in M$.
Your confusion arises from the fact that you are using the same letter in both equations. It would be better to say that invertibility is the property that for every $m$ there is a solution to the equation $m*x = e$, and a solution to the equation $y*m=e$. You can then prove that the solutions will in fact be the same, since $$y = y*e = y*(m*x) = (y*m)*x = e*x = x.$$
Moreover, while it is true that the two equations together imply that $mx=xm$, this is not equivalent to commutativity. To be clear, commutativity would be
Here you have only
That is, you are only guaranteed that a particular element commutes with each $m$, not that every element commutes with every element.
Consider the usual "axioms" of a group. the ingredients are a set $S$, and a function $\cdot\colon S\times S\to S$, which we write using infix notation (so we write $a\cdot b$ or $ab$ instead of $\cdot(a,b)$). Then we require:
If we relax the requirements that all three conditions get satisfied, we get more general structures (but the more general the structure, the less we can say about them).
There are other things you can do; it does not make sense to drop the second and keep the third condition.
If you drop the first (associativity), then can relax the conditions a bit and ask that all equations of the form $ax=b$ and $ya=b$ have solutions, but not requiring that the operation be associative. That gives you a quasigroup. If you require that all such equations have solutions and that there be an identity, you get a loop. This is equivalent to asking that conditions 2 and 3 be satisfied, but not condition 1.
Within each category you can put other conditions. There are "cancellation semigroups", which are semigroups in which $ax=ay$ implies $x=y$. There are "inverse semigroups" which, perhaps confusingly, does not mean that condition 3 is satisfied (makes no sense if we don't have condition 2), but rather that for every $a$ there exists a $b$ such that $aba=a$ and $bab=b$. And so on and so forth. Lots of different wrinkles to be seen in there.