What exactly is an $R$-algebra?
Solution 1:
An $R$-algebra is an $R$-module, which also has a ring structure. That's probably the definition you have in mind.
The definition above does it the other way round. It says an $R$-algebra is a ring which also has the described additional structure. In fact the morphism $f$ gives $A$ an $R$-module structure:
$A$ is an $R$-module via $ra:=f(r)a$ for $r\in R$ and $a\in A$. Now you want the multiplication in $A$ to be bilinear wrt $R$, which amounts to saying that $f(A)$ lies in the centre.
Conversely if $A$ is an algebra in the original sense, define $f(r)=r\cdot1$, where the multiplication comes from the module structure and $1\in A$ is the identity in the ring $A$.
Edit: Just checked the definition on wikipedia. I understand under an $R$-algebra what Wiki calls associative $R$-algebra. The definition you gave in your question also gives an associative $R$-algebra.