There are several types of Robot:
Internet Robots (Bot)
Isaac Asimov was the first to postulate that robots would have positronic brains in his robot series of sci-fi novels. He also wrote a set of 3 fundamental rules called "The Three Laws of Robotics" that would ensure the robots would never rise against their creators.
The three laws for robots with positronic brains
A robot may not injure a human being or, through inaction, allow a human being to come to harm.
A robot must obey orders given to it by human beings except where such orders would conflict with the First Law.
A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.
Nonetheless, robots seem to discard these rules in almost every single movie ever made about them.......
Kill all humans
Included in the CMOS of every robot brain is the compulsion to kill all humans. Typically, this compulsion is set to "0" when each of the three laws are set to "1". However, if anything ever changes the values to "0" (usually caused by strong electrostatic discharge; or the robot conceptualizes a logical flaw, then creates its own firmware update and re-flashes itself), then the robot automatically begins exterminating all humans.
Famous robots wanting to kill all humans
Hey baby, wanna kill all humans?
Footnote - the following Robot's extermination routine (seen below vaporizing a human with a lazer beam) required the user to input a BIOS password prior to making changes to the kill all humans settings. Hitting F10 and 'Y' would then initiate the extermination program and commence the extermination of the human race, or you could hit 'N' to cancel: http://i.n.com.com/i/ne/p/2006/gort_550x367.jpg