The letter 'sin' שֹ is known to have originally been pronounced distinctly from both 'shin' שׁ and 'samekh' ס. The letter 'sin' occurs precisely in words where Arabic has a /ʃ/ sound (like in ship), e.g. עשרה = Ar. /ʕaʃra/, showing that the common ancestor of Hebrew and Arabic had a distinct sound wherever this letter occurs. In fact, some obscure Semitic languages (the Modern South Arabian languages) have preserved this sound.
It's thought that sin was originally pronounced as a voiceless lateral fricative /ɬ/, like Welsh llwyd 'gray'. This sound is pronounced similarly to /l/ (as in land), but without vibration of the vocal cords, as if whispering, and often with a 'hushing' articulation. It's also often found in disordered speech. (I personally know someone who pronounces /ʃ/ as [ɬ] in English.) Some English loanwords show that sin had an l-like sound, like Balsam for Hebrew בשם and Chaldean for כשדי.
/ɬ/ (sin) and /s/ (samekh) must have begun merging quite early, since samekh is often used for sin in later books of the Tanakh. However Samaritans pronounce sin as /ʃ/, merging it with shin rather than samekh.
Why did the letter ש serve to indicate two consonants? The Hebrew alphabet was borrowed from the Phoenicians, for whom the sound /ɬ/ had already been lost, so the letter ש was adopted for this purpose. Actually other letters in the Hebrew alphabet also indicated multiple sounds, but that can wait for a different post...