***SPOILERS - If you haven't seen the movie, whether you plan to see it or not, i suggest you dont read this, and go see the movie***
I loved I Robot. So... what exactly didn't you understand? Anyway... there are the three laws the robots must obey. First law is that it must protect humans, and cant hurt them. The other laws of course are only valid if they dont conflict with the first law. But what happens when the first law conflicts with itself? The robots generally saw things more immediately, as the people did. Protect people, and maybe do a calculation to see the chances of saving one and the chances of saving the other, to decide which to save. All of it just cold logic of how to follow it's rules. Will smith's character said to save the girl, but he had a better chance of being saved, and even though the second law is to obey people, it couldn't break the first by harming the person with a better chance of survival.
So then there's the main computer, which can uplink with many robots. With it's greater computational power and access to all the many other computers, it sees the first law on a larger scale. One of the biggest threats to humans, are ourselves. In order to obey the first law on a larger scale, saving the lives of many many people, it must take charge and impose curvews, and such. It's not like it has the bill of rights programmed into it or anything, so our freedom and happiness are unimportant to it. At least... unimportant compared to the few lives that would be saved.