Instructions
Open your inventory and highlight the ocarina. Press any of the "C" buttons -- the yellow buttons in the upper right corner of the controller -- to assign the ocarina to that button.
Exit your inventory and press the button assigned to the ocarina. Link will whip out the ocarina and a musical bar will appear on the lower portion of the screen.
Tap the C buttons to play notes on the ocarina. You can either play a song you learned from a character earlier in the game or just free-style for a while.