The metal horns originated in Europe as a sign against the evil eye, and have been mentioned in this context in literature such as Dracula by Bram Stoker. In some regions, they were also used to symbolise a cuckold, since traditionally a cuckold is represented with horns on his head.
Ronnie James Dio learned the gesture from an Italian grandmother, and began using it onstage during his time with Black Sabbath, continuing throughout his career from that point. Since then it has become synonymous with metal and metalheads. Although Dio is generally regarded as the originator of the horns, Gene Simmons of Kiss claims to have been the first to use the gesture in concert.
There is some debate as to whether the horns should have the thumb 'in', holding down the two middle fingers, or out to the side; however, out to the side makes the gesture into the I Love You sign, which isn't particularly metal.
They are generally seen at metal gigs and in any situation if photographs are being taken, and can be a gesture of approval or defiance depending on context. Many non-metallers use the horns ironically, sparking annoyance from those who use them seriously. Some people take this 'ironic horn-throwing' and horn throwing by posers very seriously, as seen on the website takebackthehorns.com. Despite seeming a bit over-the-top, it is evident that people are getting annoyed with posers using the horns.