This can be understood by noting that the first law bears a fundamental flaw in that it may contradict itself:
A robot may not injure a human being
or, through inaction, allow a human
being to come to harm.
This sets up two constraints: don't injure through action and don't injure through inaction. There are situations where these two constraints cannot be satisfied simultaneously. For example, it may be necessary to cause harm to an attacker to prevent harm to the person they are attacking, or there may be two people in harms way and only one can be saved. This essentially becomes a sort of maximization problem: find a solution that doesn't exactly satisfy both constraints, but gets as close to satisfying each as possible.
In the movie, the older-model robots could solve this maximization problem in relatively simple ways (i.e. cold, hard calculations), as explained in Spooners recollection of his accident:
Susan Calvin: The robot's brain is a
difference engine. It's reading vital
signs. It must have done...
Detective Del Spooner: It did. I was the logical
choice. It calculated that I had a 45%
chance of survival. Sarah only had an
11% chance. That was somebody's baby.
11% is more than enough. A human being
would've known that.
Thus, being a more advanced AI, VIKI had the ability to think in a more big-picture, abstract way as to how to solve the maximization problem to adequately satisfy both constraints laid out by the first law. In order to stop humanity from causing an exceeding amount of harm to itself, VIKI had to take over and limit its actions, causing a relatively smaller amount of harm in the process.