We already took a look at Bernoulli's principle and noted that the total pressure equals static pressure plus dynamic pressure.
Static Pressure + Dynamic Pressure = Total Pressure
In case the total pressure is known, dynamic pressure (measured by the pitot tube)(figure 1.1) can be found by substracting the static pressure (measured by a static vent)(figure 1.2) from the total pressure. Although the airspeed measures in units of pressure it is calibrated in a way that it presents this data as units of speed. Keep in mind that dynamic pressure is also known as impact pressure.
Figure 1.1 - Pitot tube
Figure 1.2 - Static Vent
For the pitot tube to function properly it has to be located at some point on the aircraft where the free airstream suffers the less from changes in angle of attack. At most aircraft a common location for the pitot tube to be placed is on the leading edge of the wing or on the forward part of the aircrafts fuselage. The static vents are placed parallel to the free airstream and its location depend on aircraft type, aerodynamic qualities and speed range. Figure 1.3 shows the position of the pitot tube and static vent on the Airbus A340-300.
Figure 1.3 - Location static vent and pitot tube
Always make sure the pitot tube and static vent are clear of any debris or iced over. A blocked static vent or pitot tube can have tremendous effect on correct instrument indications and thus flight safety. The effects of this will be discussed in the "instruments" section.