Cool the cake before icing.
Allow the cake to cool completely before adding the icing. Otherwise, it will melt and slide off the cake.