The letterמ denotes the phoneme/m/ (like the sound of ⟨m⟩ in the English wordmess).
The letterמ has a distinct special form used at the ends of words, namelyם. This form is calledmem sofit or (in English)final mem.
For information aboutמ as a preposition meaning roughly “from”, seeמ־.
For information aboutמ as a sort of prefix in the present tense and present participle ofpi'él,pu'ál,hif'íl,huf'ál, andhitpa'él verbs, seeAppendix:Hebrew verbs.
For information aboutם as a suffix meaning roughly “them”, which is one form of the third-person masculine plural personal pronoun, see־ם.