Both sounds are spelled with <th>, though the /ð/ sound is also spelled <the>. In the case of the homograph mouth the noun ends in a voiceless sound but the verb ends in a voiced sound but with no change in spelling. In the cae of the noun plural, mouths, the sound may be voiced or voiceless, but the verb is always voiced.
These are two dental fricatives distinguished only by voicing. Since the sounds do not occur or are not phonemically contrasted in many languages, they are a problem for learners separately and in contrast. Luckily both sounds are fairly rare in the dictionary and there are so few minimal pairs that mistakes scarcely matter.
thigh thy loth loathe mouth mouth mouths mouths wreath wreathe wreaths wreathes sheath sheathe sheaths sheathes sooth soothe teeth teethe with withe