Culling Objects Using a Culling Object
Using Renderlayers
Position your masking objects on a separate layer. (In my case layer 2.)

Go to the Properties &gt; Renderlayers Tab. Set the Mask Layer to the layer, which contains the mask objects. Note that you have to have the layers switched on in the scene for them to be included in the render.

Rendering this setup results in the following. The mask object renders as transparent.

If you do not wish the object to have a shadow, set it to a transparent material or turn off cast shadows.
Using the Material Setup
Cycles
Set the material to holdout.

Internal
Check Transparent, use Mask mode and set Alpha to 0.0. Disable Cast Shadows.