The film is set in 2044 in a world where solar flares have obliterated much of the life on the planet, specifically knocking off 99% of the human population. In this world, the remnant humans have built robot workers, known as Pilgrims, to assist humanity and to also stay the encroaching desertification around the remnant population (which we are only ever shown as living in one dying city). Unfortunately, the robots cannot save the world for humanity, and many humans become very "anti-robot". Also, in a very Asimov-esque approach, the Pilgrims have two "unalterable" protocols: they cannot harm a life and they cannot modify themselves or other robots (very much like the "Three Laws of Robotics"). The robots are rather clunky, which is kind of a drawback for the film, but they used that to give the robots their personalities.
The story follows Juan Vaucan (played by Antonio Banderas) who works for the corporation that builds and operates the Pilgrims. Vaucan lives in the tech-noir city with his pregnant wife and spends his days fixing problems with the Pilgrims (which appear more to be problems with people). The city, by the way, is dark, gritty, and has large projections of dancing woman as advertisements that are projected from the tops of buildings: it's pretty much the urban future of Blade Runner after the city begins to die. The audience is shown early that Vaucan, and just about everyone else, is dissatisfied with their dying city and their dying species (though no one really seems to want to accept it), so we are given a glum image of this human future.
From this setting, the story really begins when a dirty cop kills a Pilgrim which is repairing itself. This robot leads Vaucan on a chase to figure out how the robot could bypass the "unalterable" second protocol and builds a really enjoyable sci-fi story. Here's the trailer for the film:
Spoiler Alert: If you're one of those people who believes in spoilers, then don't read what follows
The story develops as the audience learns that several robots have alterations within their programming that allow them to bypass the second protocol. Vaucan sets out to hunt down the person responsible for the altered programming, only to learn the robots have altered the programming themselves. We're never told how this happens, but the film basically sets out the idea that the robots themselves are evolving to a new level. It's revealed that the two protocols were themselves developed by a robot that had been built and was observed to be advancing too fast for the humans of the corporation to control it. The humans asked the robot to devise a scheme for controlling future robots and that's when it developed the two protocols, just before it was shut down and dismantled by the people of the corporation. This led me to wonder about whether the advanced robot developed the two protocols knowing that they would eventually become a problem and would lead other robots to overcome them. Perhaps the robot knew that it was in danger due to how it scared the humans and decided to give them comfort in their development of the Pilgrims while using the two protocols to provide a system for the future development of robots. I think this open possibility is what I enjoyed the most about Autómata.