You can use a lattice to model an object following another object's shape. For instance take a look at the following scene. I have modelled a bottle, and now I would like to confine a character inside it. He deserves it (Poor guy...).

Poor guy...

Add a lattice around the character. I didn't use a too high resolution for the lattice. I scaled it in X and Y to fit the lattice to the character (Bending things.).

Bending things.
Lattice Modifier

Assign the Lattice to the Lattice Modifier by entering the name of the Lattice object into the OB: field; see (Lattice Modifier). Then scale the lattice again to fit the dimensions of the bottle (Scale the lattice to fit the bottle.).

Scale the lattice to fit the bottle.
Lattice control panel

Now enter Edit Mode for the lattice. Press the Outside button in the Lattice Panel in the Editing Context to switch off the inner vertices of the lattice. We will switch them on later. Move and scale the vertices in front and side views until the character perfectly fits the bottle's shape (Edit Lattice so that the poor guy is comfortable in his bottle.).

Edit Lattice so that the poor guy is comfortable in his bottle.

You can select the lattice and do the modelling in one 3D window using Local View and see the results in another window using Global View to make your modelling comfortable (Claustrophobic?).

Claustrophobic?

Hadn't we used a lattice it would have taken a lot more of vertex picking-and-moving work to deform the character (Final Render. Believe me, he deserved it!). Since lattices also supports RVK for vertex animation, quite interesting effects can be achieved with this tool.

Final Render. Believe me, he deserved it!

Lattices can be used in many applications which require a "liquid-like" deformation of a mesh. Think of a genie coming out of his lamp, or a cartoon character with its eyes popping out exaggeratedly. And have fun!