Molding an object - Negative mold
Using a boolean modifier to substract one object from another:

The original object.


Add a cube that intersects your original object (this will become your mold).



On the cube apply a boolean modifier, choose difference and select the original object.



hide the original object (delete it or move it to another layer)



once you are happy with the results you can choose to apply the modifier.

EDIT: there is also a add on that removes the step of using a modifier. Download. It has it's own tab. Just follow the steps above but instead of using a Boolean modifier use the 'direct' section in the 'booltool' tab, which is on the right side of the 3D view