The story is set in the aftermath of an extremely extensive war between forces identified as Russia and the UN. Early Russian victories had caused the American government and production to flee to the Moon Base. To counter the almost complete Russian victory, UN technicians develop robots, nicknamed claws - the basic ones are "a churning sphere of blades and metal" that attack from ambush "spinning, creeping, shaking themselves up suddenly from the grey ash and darting towards... [any warm body]", UN forces are protected by a special tab. Within six years the increasingly sophisicated and independent claws have apparently destroyed the Russian forces, repairing and redesigning themselves in automated factories. The UN forces receive a message asking for a single policy level officer to come to them for a conference on matters of grave urgency. The UN victory turns out to be rather more pyrrhic than they hoped.
A film Screamers was made in 1995 starring Peter Weller. A low budget horror/sci-fi mishmash it is roughly based on the ideas of the story but set on a 'distant planet' rather than Earth and with a softer ending.
Wikipedia contains spoilers
Major Joseph Hendricks is sent to negotiate with the Russians. On his way towards the rendezvous, he picks up a small boy called David. He encouters Russian soldiers who immediately kill the boy, revealing the child as a robot. The claws development program has extended to extremely sophisticated robots, identical to humans but designed solely to kill. The Russians, only three - Klaus, Rudi and Tasso -- reveal that the entire Russian army and command structure has collapsed under the impact of the new robots. Two varieties are identified: I-V, a wounded soldier, and III-V, David, from internal metal plates. The II-V, the second variety, remains unknown. The Russians also reveal that the UN protective tabs are ineffective against the new robots. Hendricks tries to transmit a warning to his bunker but is unable to get through. During the night, Klaus kills Rudi in the mistaken belief he is the second variety. The next morning Hendricks and the other two set off to return to the UN lines. When they reach the bunker they discover it is over-run: a crowd of Davids and Wounded Soldiers rise up to attack them, but they are destroyed by a very powerful grenade Tasso is carrying. Hendricks and Tasso flee, leaving Klaus to the old-style claws. Klaus survives and rejoins them but is shot by Tasso and revealed as a robot, the second variety. Hendricks is suffering from internal injuries and hoping to escape to the Moon Base, so he and Tasso search for a concealed rocket cruiser. Discovering the vessel, it is revealed as only a single-seater. The injured Hendricks attempts to leave but is quickly subdued by Tasso. Tasso convinces Hndricks to let her leave and send back help. Left alone, Hendricks returns to the remains of Klaus, where he discovers the robot was not a II-V but a IV-V. He is then attacked by a group of robots, including a number of Tassos. Realising he may have doomed Moon Base, he is comforted in his imminent death by the fact the claws are already developing ways to destroy each other.
See also clanking replicators.