Such a combination of letters is called a root.
So the root for salaam – islaam – muslim is
s – l – m
س – ل – م
This particular root (s – l – m) conveys the idea of ‘peace’. And this is what the three words actually mean:
salaam is the Arabic word for ‘peace’.
islaam is the name of the religion and means ‘submission’ (to the will of God/Allah), and this again means to be in peace with God/Allah and oneself.
muslim means a person who has submitted their will to God/Allah and is, therefore, in peace with God/Allah and themselves.