How did Egyptians irrigate their crops in canals?

Irrigation helped farmers to grow crops because the water in the Nile would spread through the canals and create wet land, so that the wet land would grow crops. Without the river Nile Ancient Egypt would have been a desert and wouldn't have been able to grow crops and create irrigation.