By indoor plumbing, we generally mean a system that consists of two parts. There is a system of pipes and valves that bring the water from a large pipe (water main) under the street into the house and to the various rooms. There is also a drainage system of pipes through which waste liquids are taken from the house and fed into a sewer pipe in the street.
The first "plumbing" system that we know about goes back about 3000BC. Archeologists doing excavations on northern plains of India uncovered a 5000-year-old metropolis of Mohenjo Daro that had a water and drainage system.
The water system was formed by conduits—stone channels through which water flows. The cisterns of the conduits collected water that fell as rain or flowed down from the hills. The water was carried by the conduits into vertical shafts and from the shafts to bathrooms and toilets. Wastewater was carried away by pipes made of terra-cotta, a form of baked clay. Amazingly enough, these terra-cotta pipes were designed so that they could be installed easily. One end of each pipe was made so it would fit into the next, and the pipes were fastened together with cementing clay.
The first people to use pipes made of lead were the Romans. They called the craftsman who installed pipes a "plumbarius," meaning "worker in lead." This is the origin of the English words "plumber" and "plumbing."
While lead is still used in some kinds of pipes today, other materials used are steel, copper, brass, cast iron, concrete, and plastic.