It is set in an alternate timeline in director Neill Blomkamp's native South Africa where insectoid aliens have landed in a giant ship. However, they are not portrayed as evil creatures, trying to take over or destroy the human race and their planet. On the contrary, they arrive ill and malnourished, as refugees, and are forced to live in inhumane conditions and poverty in a slum, isolated from the rest of the (Johannesburg) population. They are derogatively called "prawns" (derived not from the shellfish but from the Parktown Prawn, a giant cricket native to Johannesburg). Here is the rest of the story without revealing too much: When a special agent is accidentally exposed to a mysterious alien substance, he finds himself a hunted man and this suddenly changes the entire perspective.
Even though it was a low-budget movie, I believe they made one of the most outstanding SF films of the last years, one that can be admired from a technical (the CGI is amazing!), dramatic (great acting), narrative (with a few drawbacks), and educational point of view (the movie tackles issues like xenophobia, the corruptive potential of power, the inability of people to learn from history or to see beyond their own side of the table, the dark side of human capabilities when confronted with despair, media manipulation, poverty and exploitation of the weak etc. The metaphorical connotations cannot be ignored: starting from the apartheid history (the signs of the movie and of the preceeding marketing campaign reminded me so much of the apartheid signs) up to recent issues: Interestingly enough, the film shoot coincided with attacks and killings of Zimbabwean refugees living in the shanty towns.
I believe that the movie tries to show that unless one is forced to see through the other's eyes, one might never understand the limits of one's own perspective.