how to prove "monoid object in the category of monoids is a commutative monoid"? I've read about Eckmann–Hilton theorem (a * b) . (c * d) = (a . c) * (b . d). But category of monoids is not a 2-category, why are there two binary operators here?

If $(M, \cdot, 1)$ is a monoid, and $f: M \times M \rightarrow M$ a monoid homomorphism with $f(x,1) = x = f(1,x)$, then:
$x\cdot y = f(x,y)$ 
Since
$x \cdot y = f(x,1) \cdot f(1,y) = f((x,1) \cdot (1,y)) = f(x,y)$
Therefore
$x \cdot y = f(1,x) \cdot f(y,1) = f((1,x) \cdot (y,1)) = f(y,x) = y \cdot x$
