Gamma-Ray Bursts were first detected during the Cold War when the United States sent up a series of spy satellites to monitor the Russians and make sure they were adhering to the Nuclear Test Ban Treaty of 1963. When a nuclear weapon is set off, Gamma Rays are released and these satellites were tasked with looking out for them. The spy satellites detected Gamma-Rays but they weren't coming from the Earth, instead they were coming from outer space. In fact, they were coming from a galaxy six billion light years away. It took nearly thirty years to identify them.
The amount of energy that is in a Gamma-Ray Burst is more energy than is released in the Sun's entire ten billion year life-time. They are created as a result of a cataclysmic event. There are two types, short and long. Long are believed to be created by the collapse of a star in a supernova that will become a black hole and can last about a minute. The other type is unsurprisingly called short and can be created when two neutron stars collide with one another, creating a black hole and their burst can last seconds. These burst are tightly funnelled and appear like lasers compared to other explosions which funnel out and fade. A Gamma-Ray Burst must be directed at us for it to affect us.
All the GRB's that we've discovered so far are so far away that they don't hit us or not powerful enough having travelled so far to do any damage. Although they start out as funnelled like a laser, they will spread out but not spread out as much as other explosions. If a GRB explosion was nearer, it could be catastrophic for the planet and all life on the planet. The GRB would destroy the ozone and cook the planet, destroying all life on it. It is believed that a GRB once hit the Earth during the Ordovician Period and caused a mass extinction. The Earth would take millions of years to repair itself. Ref: National Geographic