Bernoulli's principle
The Pitot tube measures the difference between the static pressure and the flowing pressure of the media in the pipe. The volumetric flow is calculated from that difference using Bernoulli's principle and taking into account the pipe inside diameter.