A nasal consonant combines a constriction or closure in the mouth with an open airflow route through the nose. Lowering the soft palate opens that route; the mouth can remain closed at the consonant's place of articulation. A sustained
[m] therefore produces sound despite closed lips, whereas closing both routes stops sustained outward flow.[ref]Essentials of Linguistics (2nd edition) by Catherine Anderson and others. §3.4, nasal stops and the oral/nasal airflow distinction
Compare
[m], [n] and [ŋ]. They share a nasal manner of articulation, while their oral closures occupy different places. Comparing [m] with [b] instead holds the bilabial closure approximately fixed while changing the available airflow route. Voicing and the resonant vocal tract shape the recorded signal; the written letter alone does not specify those physical properties. New to topics? Read the docs here!