Royal icing becomes hard if it has not been beaten for long enough: it needs at least 15 minutes of beating with an electric mixer (or 20 minutes with a wooden spoon). The mixture should form soft peaks, and a palette knife run through it should leave a clean mark.
Then leave the icing to stand, covered with a damp cloth or in a sealed plastic container, for about 24 hours. This alters the structure of the sugar and makes it easier to spread and pipe. The icing can then be kept in a covered plastic container in the refrigerator for up to a fortnight, but may need further beating to restore to the right consistency. Another way of ensuring that royal icing is soft and spreads easily is to add a teaspoon of glycerine to each 500 g of icing sugar.