In Hindi, it is replaced in writing by anusvara when it is written above a consonant that carries a vowel symbol that extends above the top line.
In Classical Sanskrit, it seems to occur only over a lla, yya, or vva conjunct consonant, to show that it is pronounced as a nasalized double l, y, or v which occurs if they have become assimilated in sandhi.
In Vedic Sanskrit, it is used instead of anusvara to represent the sound anunasika when the next word starts with a vowel. It usually occurs where in earlier times a word ended in -ans.