When can a Color Ramp be used to create a gradiant in a Cycles shader? When can you use a ColorRamp node or better to say where can you use a color ramp to manipulate the color of the mesh to be a gradient and not solid?

I tried to plug the ColorRamp in to the Color input of the Diffuse shader, but I didn't get a gradient, instead I always got one color.
The ColorRamp node only remaps existing information. So without an input, you will only get a solid color as output (the solid color in the middle of the ramp, to be exact).

This is easily fixed by providing an input, such as a procedural gradient texture node: