In Zelda: Ocarina of Time you mean? Well, here's how:
Go to Lost Woods by entering it from Kokiri Forest. Go through the first passage to your left and climb the small stump in front of the Skull Kid -- the little dancing guy with the flute. Don't get to close to him or he'll vanish.
Play Saria's Song to befriend him, if you haven't already done that, and get a Piece of Heart.
Now you can sell him the mask by first putting it on, then speaking to him again. But he will only pay 10 Rupees for the mask, meaning you'll later have to pay the Happy Mask Salesman an added 10 of your own to finish the deal and get the next mask. Gaswild 14:39, September 29, 2009 (UTC)