The answer to 'how does water line work' is that a water line is the main pipe that carries fresh water from the municipal water supply or well into your home. This water line runs underground from the street or well to your home, and then branches off to supply water to various fixtures and appliances throughout the house.
The water line is typically made of copper, PEX, or plastic piping. It connects to the main water shut-off valve, which allows you to turn off the water supply to your home in case of an emergency or for repairs. From the shut-off valve, the water line branches out to deliver water to sinks, showers, toilets, washing machines, and other water-using appliances and fixtures in your home.