nice definitive answer there, god of rock[/sarcasm] x3 just kidding.
even an artificial intelligence is merely an extremely complex program. a robot is commanded by a program, which is a series of codes that determine actions. a basic program would be that for the cursor on your screen. it moves a certain distance at a certain speed according to the information it receives from the mouse, and when you click it tells whatever program is underneath it, i.e. a button, a file, or whatever, and executes that program.
it looks something like this:
on click(execute:file.execute)//
nice and simple, right?
however, a more intelligent program, like your internet browser, takes what you type into the keyboard and shows it to you, and then when you hit enter to go to a website like Gaia, it activates a search program that goes through the whole of the internet looking for the server with the title
http://www.gaiaonline.com/ and shows you the bonjour page, i.e. the login/registration page. a cookie is cool because it bypasses the bonjour code and skips right to the protected access stuff, or the home page for Gaia. I'd get more into detail about the process, but that would just bore you.
Now, an artificial intelligence is simply a huge, huge huge huge huge HUGE program with several thousand lines of code for individual probabilities. think about it this way: how many decisions do you make in a day, an hour? what to eat, what to wear, where to look, what to listen to, what this means, what that means, etc. As humans, we can comprehend these things and act accordingly, affected by our personalities, personal tastes, whatever. Computers, on the other hand, having none of the chemicals that generate emotional responses that humans have, do not interpret things the same way. Like the ultimate apathetic personality, with no emotion and only cold, hard logic. Anything that it couldn't comprehend, like emotion or an unprecedented argument, it would either ignore or fall into a loop variable and give you the classic 'Error 10110. Does not compute.' line.
Actually, if you consider it carefully, the Terminator movie prediction of the future could be a quite possible outcome if we created an artificial intelligence and told it to preserve the Earth. minus the time travel. that part actually IS impossible. ^^
any questions? I'm sure I left something out...