Once awakened, humans were able to build up a resistance against the machines while also evening the odds against them back in the Matrix. No longer shackled by the chains of the harvesting machines, humans could check in and out of the Matrix, fighting agents and hoping to free more minds. One such mind was Neo, a.k.a. Mr. Anderson. He had the ability to move and fight like the agents, and for some reason, was able to destroy Agent Smith at one point. Or so he thought.
Smith became a rogue program, resurfacing in various spots all over the Matrix without being under the control of the machines. Just as Neo did, Smith began to learn that the boundaries of his programming could be broken and discovered new powers, including being able to clone himself, copying his self on top of another program, i.e. another person in the Matrix. This led to the frightening paradox of Smith finding himself in the real world, having taken control of a mind and sabatoging a rebel ship, leading to a showdown with Neo.
As his numbers grew, so did Smith's superiority complex. He already felt he was a supreme being, above humans and all other life forms, but his hold of the Matrix expanded once he took over the Oracle's program. With seemingly boundless knowledge and abilities, Smith once again found himself facing Neo, this time for control of the Matrix. In the end, the Smith program was terminated, obliterated by Neo and the machines in a rare union between humans and their sworn enemies. But we all know, if Smith rose before, he can certainly rise again.
Source: movievillains.com