My definition of an associative unital algebra over a commutative ring $R$ is this: an $R$-module $A$, together with a bilinear multiplication $A\times A\to A$, compatible with scalar multiplication: $\lambda (xy)=(\lambda x)y=x (\lambda y)$. I read that such an algebra can be described as a monoid object in the category of $R$-modules, in the same fashion a ring can be viewed as a monoid object in the category of abelian groups. What I can't understand is: how can I express the compatibility property above using the commutative diagrams of a monoid object in $R$-modules category? (similar question for distributivity properties of a ring).
In order to talk about monoid objects you need to be in a monoidal category.
If you consider the monoidal category of $R$-modukes with the monoidal structure provided by the tensor product hence a monoid object is given by an object $M$ and morphisms $m \colon M \otimes M \to M$ and $e \colon 1 \to M$ making commute certain diagrams.
By the very definition of the tensor product the mapping $m$ is essentially a $R$-bilinear map (because we identify the bilinear map with the underlying linear map from the tensor product).
I hope this helps.