The operation of a diaphragm pump involves the movement of a diaphragm within a chamber. When the diaphragm moves up, it creates a vacuum that draws the fluid into the chamber. When it moves down, the fluid is pushed out through a discharge valve. This cyclical motion ensures the continuous flow of fluid.