Subassembly
A subassembly is a pre-designed set of parts. The player can design these in the Vehicle Assembly Building or Space Plane Hangar.
They are a great way to reduce construction and design time, by giving the ability to save complex blocks of parts, like big liquid-booster-stages with separately disposable tanks. A root node of a subassembly needs at least one empty stacked attachment node, where the subassembly can be attached to later rockets. A subassembly can't be used as the first part. All subassemblies are shared between both buildings but not between save games.
Subassemblies were introduced in KSP version 0.22.
Bugs
A bug where fuel lines and struts are not able to connect properly when saved as a subassembly and loaded later has been found. It causes problems especially with asparagus staged rockets or large rockets which need extensive strutting.
"Perfect subassemblies"
Temstar, a KSP forum member, proposed a workaround for this. He dubbed the subassemblies made this way "perfect subassemblies". Assuming the subassembly to be created is a rocket without the payload and you only want to save the rocket but not the payload (everything below the decoupler that connects the rocket to the payload), and the first part (the root part) of the rocket is in the payload:
1. Save the entire rocket, then move away the part to be saved as the subassembly. Then delete the section (payload) that should not be included in the subassembly. Also delete the root part (such as the command pod). The camera should change orientation and will not be able to be moved around due to lack of the root part.
2. Select a decoupler as the root part and put the rest of the rocket below the decoupler. Do NOT save it as a subassembly. Instead, rename and save it as another normal .craft file (NOT the one where your original craft along with the payload is).
3. move the .craft file from KSP directory\saves\(your save here)\Ships\VAB or SPH\(your rocket here).craft -----> KSP directory\saves\(your save here)\Subassemblies folder.
4. You should see the subassembly appear once you select a command pod and switch to the subassembly tab in the parts list. Load it and put it under the command pod.Check for garbled fuel lines. They should all be properly connected if you did it right.