How do I mute an ocarina?
You can mute an ocarina by blowing it very softly. Ocarinas behave differently depending on how hard they are blown, and when blown very softly, before they start to break into their normal sounding mode, they produce a low volume squeaking sound.
It is also possible to augment this approach of muting an ocarina by partly covering the sound hole with tape, or by folding a piece of paper such that it fits into the windway and partially blocks it. There are also devices on the market which aim to do the same by fitting over the mouthpiece.
Such physical modifications don't do anything that can't be done by just blowing softly.
The cons of muting an ocarina
Muting an ocarina changes the instrument's pitch and timbre. Most ocarinas will be able play in tune with themselves when underblown, but will be about a semitone flat of their intended pitch.
An ocarina muted in this way is adequate for practising fingerings, but not much more than that. It is still important to practise anything you are going to play at normal pressure so you can learn to play in tune.
Ultimately, ocarinas are not well suited to muting due to physics. An ocarina can be made quieter when it is designed by making the chamber and voicing smaller, but there is a limit to this. As holes are opened more air is needed, so the player has to blow harder and this naturally causes more volume. You can only lower the pressure so much before the high notes start to sound really bad.
I think that the best way of muting an ocarina would be to develop a faithful electronic simulation of the instrument. You can't get much quieter than playing on headphones.