How does static port measures the static pressure?
Your friend is correct. It's situated in a spot where the dynamic pressure is non-existent or minimal such as on the rear side of the fuselage on a Cessna 172 where it's able to measure the ambient pressure. This pressure is then either fed by tubes to their respective instruments (ASI, Altimeter, and VSI), or on modern aircraft, it is read by a transducer (or analog to to digital interface units - A/DIFU) which converts the reading to electronic data which is then fed to the air data computer.