Examples : I scream and ice-cream have the same phoneme sequence : /aɪskri:m/ But listeners are able to perceive where the first word stops and the second starts in each case, Similarly with It was a grade A and It was a grey day.
How are the sequences distinguished? Firstly, perception may be helped by context. Celce-Murcia et al give the example This violence is getting out of hand. We really must do something about /ətæksɒnbʌsɪz/ (1996 : 241) which could be decoded as either a tax on buses or attacks on buses, but in context is liable to be understood as the second. However, there are also phonetic clues. O'Connor (1973:245) gives the example of a grey tape vs a great ape. Firstly the /eɪ/ will be longer in grey than in great, and secondly two different allophones of /t/ will be used - aspirated [th] in tape as opposed to no aspiration in great. Or in some accents the /t/ in great might be replaced completely by a glottal stop [ʔ] or alveolar flap [ɾ].
References
Celce-Murcia, M., Brinton, D.M Goodwin, J.M.,(1996) Teaching Pronunciation, CUP
O'Connor, J.D. (1973) Phonetics, Pelican