In the bowl of a stand mixer fit with the paddle or in a large bowl with a handheld electric mixer, combine the fresh or powdered egg whites and sugar, starting slowly to avoid clouds of confectioners’ sugar covering you and your kitchen. Continue whisking until the ingredients form a thick, smooth paste that's bright white in color and has the consistency of toothpaste, at least 5 minutes.
You may need to add a little water to achieve the desired consistency. Making icing is not an exact science. We often end up adding a little more water or confectioners' sugar to get the icing to exactly the right consistency.
Piping icing is smooth and thick, a bit like the texture of toothpaste. This icing is used for adding fine detail and decoration, as on gingerbread cookies, and for piping borders, which form little "walls" around the areas of the cookie that you want to fill with the flooding icing, as on Hanukkah cookies. It has to be just soft enough to squeeze out of the piping bag, but also thick enough to hold its shape perfectly. To make it, you may need to beat just a little extra confectioners' sugar or a few drops of water into your royal icing to achieve the right consistency for piping icing. If you don't need to flood your cookies, just use the royal icing as-is or tint it with food coloring. Medium icing shouldn't drip or flow but rather hold its place yet still be easy to blend into the piped icing that you spread it next to.
Flooding icing is glossy and almost pourable. This icing is squeezed onto cookies to flood areas where a shiny, smooth effect is required. It's well worth investing in a few small squeeze bottles to dispense the icing from; with their screw-on nozzles, they are perfect for directing the flow of flooding icing to exactly where it should be. To make it, gradually add enough water, a few drops at a time, stirring constantly, until you have a smooth, just pourable mixture that has roughly the same consistency, maybe a little thicker, as heavy cream.
You really need to use royal icing on the day that it's made. If you're not immediately using the icing, cover the bowl with plastic wrap and refrigerate it for up to a few hours or, if you need, it can be stored in the fridge in piping bags or squeezy bottles. Keep in mind that the icing tends to separate a little and become less easy to handle after standing for more than just a few hours.