Acotton candy machine works by heating granulated sugar and spinning it rapidly so that the melted sugar is forced through tiny holes, forming thin strands that cool quickly in the air and collect in a large bowl around the machine. The strands are then gathered on a stick or cone to form fluffy cotton candy.