To make royal icing you will need egg whites and icing (powdered) sugar.
A good measurment is 1 cup (120 g) of powdered sugar to 1 egg white (from 1 medium egg) but this always varies a bit depending on the size of the eggs.
With your mixer start beating 1 egg white on low spead for 1 minute. Slowly start to add your icing sugar and beat until smooth (5-7 minutes). It has to be thick enough so that it doesn`t drizzle but not too thick so that it doesn`t go through your piping bag. Add as much or little sugar you think it needs. If you want to color you icing, you can add a few drips of food coloring when it`s done and lightly mix it on low speed. It is best to use powder food coloring so that it doesn`t change its consistency. You have to use your icing immediately, otherwise it will dry to a very hard consistency.
To decorate cookies, place your icing into a plastic bag, cut off a tiny bit of 1 corner with scisors and start icing. Also, you can use different kind of sprinkles, raisins, m&m`s etc. to make your gingerbread men real interesting. Leave your decorated cookies sitting on a wire rack so that the icing hardens (which will happen in 15-30 minutes).