If necessary, water the ground where you plan to lay the irrigation pipe. Water just enough to moisten and soften the soil so that it is easier to dig, but don't create any puddles or pooled water or you'll have to contend with mud.
Mark where you want to lay the irrigation pipe using small landscaping flags or wooden stakes. Place the flags every 6 to 12 inches and ensure that they follow the proper lines.
Begin digging your trench using a narrow-blade trenching shovel. Start with the trench for the main irrigation pipe, beginning at the water source, such as your outdoor water faucet.
Dig the trench to a depth of at least 18 inches plus the diameter of the mainline pipe that will be connected to the water source. Dig the trench deeper if your area has very cold winters (you want to bury the pipe below the frost line of your area).
Dig trenches for the lateral irrigation pipes that connect to the mainline pipe. Make the trenches for the lateral pipes at least 12 inches deep in addition to the diameter of the pipes, again making the trenches deeper in colder regions.
Tamp down the soil and level out the bottom of all the trenches. Sprinkle water into the trenches lightly to help the dirt settle.
Assemble the irrigation pipes. Cut the pipes to the desired lengths using a pipe cutter or hacksaw. Install a controlling valve for each zone, install any fittings using the appropriate cement for your pipe material. If you are installing a sprinkler system, install the sprinkler heads to the lateral irrigation pipes according to the manufacturer's instructions. If you are installing a garden-irrigation system, be sure to install tees and taps at the appropriate intervals.
Be sure all connections are made and secured before testing the system. Shut off the water supply, and attach the main valve to the water source (the main water line or outdoor faucet).
Install the backflow-prevention valve, if you're using one, following the manufacturer's directions. Connect the mainline irrigation pipe to the main valve at the water source.
Lay the pre-assembled irrigation pipes into the bottom of the trenches. If you're using pop-up sprinklers, ensure that the sprinklers can retract to the soil surface.
Connect any control wires for the valves according to the manufacturer's instructions. Lay the wire beside or under the irrigation pipes (never above the pipes), at least 2 inches away from the pipe. Turn the water supply on and test the irrigation pipes, running water through the pipes, checking for any leaks, and ensuring adequate water flow and distribution.
Backfill the trenches using the displaced dirt you set aside. For the first few days, check for leaks (indicated by wet spots in the trenches), as it is easier to dig up the soil and repair such leaks before planting grass over the trench.