Magic shells work by adding a fat (like coconut oil) to chocolate and then melting it together. As the melted chocolate cools, the fat hardens, which makes the chocolate harden as well. This results in the crunchy hard chocolate topping we all know and love!