House building contractors usually hire plumbers and electricians to lay the basic pipes and wires while the house is being built. After the walls and floors are in place the plumbing and electrical fixtures are added, and the stub out is part of the process.
The pipes that go to the toilets, sinks, showers and drains--as well as any pipes that vent to the roof--must be in place and tested before the walls are added. The process of laying these pipes, and putting protective plugs or caps to keep building debris out, is called a plumbing stub out.
The final appointments should be known before the stub out begins. It is necessary to know pipe sizes and the heights of pipes that go to the sinks. It is also necessary that water be put in all the pipes--to make sure that they do not leak--before the pipes are capped. It is much easier to fix problems before the walls are put in place.
Clean out is a term that is often confused with stub out, but it is an entirely different thing. A clean out is a place--usually located at a point where a pipe curves--to make it easy for a plumber to insert a snake to clean out a pipe. Clean outs are usually located on pipes that go to toilets, sinks and septic tanks.