In order to get a fixed and repeated rotation you can use the f-curve 'Generate' modifier. This allows you to define an equation (that you can precisely tune for the required rotation) for the f-curve rather than basing on keyframes.
To achieve this, once you have added a single keyframe, open the Graph Editor and select the relevant channel (eg, Z-rotation). In the Modifiers panel, select Add Modifier and select 'Generator'.
Set the polinomial to '1' since we want a straight line. The generator defines an equation as
y = c + mx where
c is a constant and
m the multiplication factor for the
x value (effectively the 'frame' of the animation).
The rotation is measured in radians - so 2xPi radians is a full rotation.
In order to have your object to make a complete rotation in, say, 50 frames you should enter the 'x' multipler ("coefficient for polynomial") to 2*pi/50 (just type that into the field and press Enter - Blender will calculate it for you and show the result (0.126 in this case)).
Repeat for the other object but choose a suitable number of frames (so there's a common factor). For example, 50 frames for one object and 100 for the other will result in them both getting back to their start rotation after 100 frames.
For your situation with an object orbiting the planet you could setup similar to the following :
In the scene there is a Cube (planet), Suzanne (moon) and Empty (to act as the centre of the moon's orbit). Suzanne is a child of the Empty (select Suzanne, hold Shift, select Empty, press Ctrl+P and choose 'Object' - so rotating the empty will move Suzanne around the orbit.
Now select each object in turn (Cube, Suzanne, Empty) and add a keyframe on the Z-rotation.
Select the Cube, open the Graph Editor (as detailed above), add a Generator modifier and set the X coefficient to
2*pi/100 (rotate once per 100 frames).
Repeat for the Empty but set the coefficient to
2*pi/50 (rotate once per 50 frames).
Repeat for Suzanne to set the rotation of the 'moon'.