The original hedgehog gene was discovered using fruit flies. Rather than the usual smooth cuticle they should have had, the fruit fly embryos defective for hedgehog had spiky bristles - earning the gene its name. The search for corresponding genes (or homologues) in vertebrates revealed 3: Indian Hedgehog (IHH), Desert Hedgehog (DHH) and Sonic Hedgehog (SHH), named for the Sega character. These genes all encode signalling proteins, which bear the same names, and of these 3 sonic hedgehog is the most researched and best understood.
So what does SHH do? It has key roles in embryonic development, affecting limb and organ creation. The shh protein guides cell growth, cell differentiation and the "patterning" of the embryo. It is also extremely important in creating the facial geometry. Different concentrations of shh in different parts of the embryo guide formation of different cells.
Sometimes the best way to understand what something does is to look at what happens when it's not working. Many defects are associated with mutations to SHH: we've already discussed how it can cause a type of holoprosencephaly (where the forebrain does not split into two hemispheres). Cyclopia accompanies severe holoprosencephaly: like the forebrain, the eyes start out as one and are split into two by shh. Some mutations leave one large eye; others create the two eyes but leave them together in a single middle socket.
The effects on organ development can be seen in mice with both copies of SHH disabled (see image). Their hearts, lungs, kidneys and guts are malformed. The face does not have its usual shape and instead forms a strange trunk, absent of eyes, ears or mouth. They have no paws and are always stillborn.
As hinted at with eye development, shh is key in creating the symmetry of the face. It controls the growth of the what will become the jaws and features. Shh has a lot of control over the width of the face; creatures with too much shh develop very wide faces. Increase the amount of shh even more and the face starts doubling, resulting in a condition known as diprosopus - "two faced". The organism can have two distorted faces, typically united by an eye in the middle.