Sandhi (सन्धि sɐndɦi, "joining") is a cover term for a wide variety of sound changes that occur at morpheme or word boundaries. Examples include fusion of sounds across word boundaries and the alteration of one sound depending on nearby sounds or the grammatical function of the adjacent words. Sandhi belongs to morphophonology.
Sandhi occurs in many languages, particularly in the phonology of Indian languages (especially Sanskrit, Tamil, Sinhala, Telugu, Marathi, Hindi, Pali, Kannada, Bengali, Assamese, Malayalam). Many dialects of British English show linking and intrusive R.
A subset of sandhi called tone sandhi more specifically refers to tone changes between words and syllables. This is a common feature of many tonal languages such as Mandarin Chinese.
Sandhi can be either
internal, at morpheme boundaries within words, such as syn- + pathy: sympathy, or
external, at word boundaries, such as the pronunciation "tem books" for ten books in some dialects of English. The linking /r/ process of some dialects of English ("I saw-r-a film" in British English) is a kind of external sandhi, as are French liaison (pronunciation of usually silent final consonants of words before words beginning with vowels) and Italian raddoppiamento fonosintattico (lengthening of initial consonants of words after certain words ending in vowels).
It may be extremely common in speech, but sandhi (especially external) is typically ignored in spelling, as is the case in English (exceptions: the distinction between a and an; the prefixes syn-, in-, en-, and con-). Sandhi is, however, reflected in the orthography of Sanskrit, Sinhala, Telugu, Marathi, Pali and some other Indian languages, as with Italian in the case of compound words with lexicalised syntactic gemination.
External sandhi effects can sometimes become morphologised (apply only in certain morphological and syntactic environments) as in Tamil and, over time, turn into consonant mutations.
Most tonal languages have tone sandhi in which the tones of words alter according to certain rules.