They started out as devices called motormeters. They were thermometers built into the radiator cap to monitor engine temperature. They didn't look very good, so decorative flourishes were added to them to make them look better.
When temperature gauges moved inside the car, automobile designers continued to decorate the radiator caps giving birth to the hood ornament. They were to stay in style until the 1960s, when a the trend towards sleeker aerodynamic cars, as well as cost cutting measures I suspect, began to lead to their disappearance.
Below are a couple of more hood ornament pictures, and there are many more examples after the jump.