There are two basic approaches to AI: "top-down" and "bottom-up." The "bottom-up" technique is the one most folks are familiar with; it involves programming as many rules as possible (millions and millions of lines of code) in an attempt to reach the level of complexity at which true intelligence emerges. But most computer scientists believe the "top-down" approach-which allows a computer to "learn" about its environment starting from a few basic principles-is more promising.
The ultimate goal is to pass a "Turing Test." In a classic Turing Test, a human interrogator conducts two simultaneous conversations via instant-messaging: one with a human subject, and one with a computer that has presumably attained human-level intelligence. If, at the end of hours or days of talk, the interrogator can't tell which subject is human and which is artificial, then the computer is considered to have passed the test and attained a human level of cognition.
Reverse engineering may be key. As researchers are able to probe the functioning of the human brain in greater and greater detail, it may be possible to model a computer on the complex functioning of billions of neurons-thus invoking AI by simulating the human brain. Although the technology isn't quite there yet, many experts believe such "reverse-engineering" will provide most of the advances in future AI.
Computer consciousness may be an unattainable goal. Most scientists agree that if a computer passes a Turing Test, there's no reason to deny that it's somehow "conscious." However, a minority of physicists and mathematicians believe that computers will never be able to attain consciousness, for technical reasons related to the limited capacity of a logical system to understand its own operating principles.
A truly intelligent computer may be unpredictable. Once a computer has reached a human level of cognition, it may be possible for that computer (in cooperation with others of its kind) to design a yet more advanced computer that will be beyond a human's ability to comprehend. This, in a nutshell, is what all those sci-fi writers were worried about: once this point has been reached, it's possible that computers truly will take over the world!