"The Lazy Guns had not had a happy history; they had turned up during the Interregnum following the Second War, seemingly products of Halo; the vast Thrial-polar Machine Intelligence artefact/habitat destroyed by whatever mysterious weapon had been fired from—and which appeared to have obliterated—the moons of the giant gas planet Phrastesis."
The Lazy Guns are a creation of Iain M. Banks and appear in his book Against a Dark Background. They are described as "light but massy" and apparently their weight increases by a factor of 3 when turned upside down They have been described as the only weapon to ever demonstrate a sense of humor.
To use a Lazy Gun, the operator has to line the target up in the sights and then adjust for the target's breadth and distance; this is because the Gun is in fact immensely powerful and can destroy just about anything.
When fired, the Gun can dispatch its target in a number of different ways; the larger the target, the less imaginative the Gun becomes. For example, firing at a person might cause a piano to materialise above them, or cause them to be electrocuted by a momentary pair of giant electrodes, whereas larger targets (eg, cities) just tend to disappear.
The only record of an attempt to disassemble a Lazy Gun was made in Lip City on Golther; the result was that the entire city (buildings, people, Gun and all) disappeared, to be replaced by a giant salt-water lake, complete with wildlife, and 23 "nano-bang" holes (minature black holes, I imagine).
The last surviving Lazy Gun was thought to have been destroyed along with Lip City, until rumours began to surface of one more, its location buried in an ancient (and itself mythical) text, the Universal Principles. Against a Dark Background tells the tale of the search for the Gun.
My thanks to Ralphnumbers for correcting errors in the above :)