Magic Hat contains Gems that can be created by making 3 matches next to it. The magic hat will close when the required number of gems is created.

To clear gems, three or more of them must be matched.