To be a module, f must respect group addition, both in G and in R. In other words, f(x,a) + f(x,b) = f(x,a+b), and f(x,a) + f(y,a) = f(x+y,a). Note that f(0,a) = f(0-0,a) = f(0,a)-f(0,a) = 0. Using similar reasoning, f(x,0) = 0. If n is a positive integer, show by induction that n*f(x,a) = f(n*x,a) = f(x,n*a). Use inverses in the abelian group to generalize this to negative values of n.
We also require f(x,f(y,a)) = f(xy,a). This is a form of associativity; at least it looks that way when you use multiplicative notation: (xy)a = x(ya).
If H is any left ideal in R, and a belongs to H, f(x,a) = x*a defines a left module. In other words, a left ideal in R is a left R module.
Another example: multiply cosets of the left ideal H by elements of R on the left to get another R module. If H were a two sided ideal the module would be the homomorphic image R/H, but when H is a left ideal, we have a left R module. Don't assume elements of H drive cosets into H; they may not, since H is not a two sided ideal.
The cosets of one left ideal inside another form a left R module. Similarly, the cosets of a submodule form a new module, but this is really the image of a module homomorphism, and we'll get to that later.
Given a ring homomorphism f(R) = S, every S module is also an R module. Let R act on group elements as f(R) would. Some algebra shows this is indeed an R module.
Any abelian group is a module over the integers, where n*a is iterative adition, or iterative addition on -a if n is negative. Since the ring is the integers, denoted Z, we call this a Z module.
Right modules exist as well, in which f takes G cross R into G and satisfies the analogous identities. Right ideals, and cosets thereof, become right modules. If R is commutative, left and right modules are indistinguishable, and are simply called modules.