To create a subpatch named "container" create a new object [pd container]. You can replace "container" with whatever you want your subpatch to be called.
This will open up a new pd window displaying the contents (currently none) of your subpatch. To open the subpatch later on you can click on it in performance mode or right/control click in edit mode and select "open".
To send audio into or out of the subpatch, create [inlet~] or [outlet~] objects.
To send non-audio data into or out of the subpatch, create [inlet] or [outlet] objects.
To enable graph-on-parent control/right click on the subpatch, select properties, and check the box next to graph-on-parent. This will create a red rectangle (resizeable in the properties). Any gui objects within this rectangle will be visible and accessible from the parent patch, all patch cables and non-gui objects will not be displayed in the parent patch.
For more information, check out the subpatch and graph-on-parent sections of the FLOSS manual:
http://en.flossmanuals.net/PureData/