How would you make a ground plane that goes on forever?
Here is an example, but it is from a very very old version of blender.
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
I don't think this really is possible in cycles currently, however you probably don't actually need an infinite plane.
The camera will only render objects up to a finite distance away (end clipping value), so your plane only needs to be larger than this value to appear "infinite".
To do this, enable Limits in Camera settings > Display to display a line visualizing the start and end clipping of the camera:
As long as your end clipping value is reasonably high and your plane is larger than it, the plane will appear reasonably infinite:
If you instead want an effect like in iKlsR's answer, you'll have to do some compositing with renderlayers.
Move your diffuse ground plane to another layer
Create another renderlayer and set the layer to the layer on which your ground plane is, then enable the shadow, AO, and Diffuse indirect passes:
In this example, the ground plane is on layer 2 and the rest of the scene is on layer 1.
Enable Environment on the original renderlayer, which should also be set to only render the layer with all the objects besides the ground plane.
Enable Transparent in Render settings > Film
From my answer on How to make a model cast shadows onto the world texture/background?.
Basically all you need is a plane to catch the shadow of the object(s) on it.
A quick way to achieve this using the internal renderer is to add a plane, select it and add a new material, in the material settings under Shadow, enable Shadows Only.
Next, you can optionally enable transparency, use Z Transparency and use the alpha slider to control the strength/darkness of the shadow.
To further enhance this and add to the realism, you can enable Ambient Occlusion and use a blend sky (for simple renders). It is also worth noting that the shadow you get is dependent on the type of lamp and world settings you use in some cases, in the image below I am using a sun lamp with ray shadow enabled and I also have Environment lighting turned on, this softens the shadow and its harder to control but gives a nicer subtle effect.
Here I am using a sun lamp and a point lamp with Environment lighting off, with this setup, I can easier adjust the opacity of the shadow with the transparency setting.