In the beginning of the second film, Frodo and Sam encountered Gollum, a corrupted hobbit-like creature who craved the ring. After capturing him, he became their guide. He leads Frodo and Sam through the Dead Marshes, and a fair distance towards Mordor, but then the party was captured by Faramir. However, on hearing news of his brother Boromir's corruption at the hands of the Ring, Faramir lets them go, to accomplish their task.
Back at the scene of the battle, Gimli, Legolas, and Aragorn set of in pursuit of the band of orcs that captured Merry and Pippin. Shortly thereafter, they met the Riders of Rohan and their leader, Eomer, who told them that King Theoden of Rohan was possessed by Saruman, and had exiled him. The riders had also, apparently, encountered a band of orcs, and killed them all. The pursuers then set off, and, after some searching, Aragorn found the hobbit's trail again, leading into the forest. They ddi not find their quarry, but encountered Gandalf, who had, apparently, defeated the Balrog, and became the new white wizard, replacing the corrupt Saruman.
Merry and Pippin turned out to have escaped form the orcs, and Treebeard, an Ents. After discovering the havoc Saruman had wreaked on their beloved forest, the Ents launched a successful attack on Isengard, fortress of Saruman, almost utterly destroying it.After the party rode to Edoras, Gandalf freed Theoden from Saruman's control, and Grima, the king's former favourite, and a spy of Saruman living in Edoras, is thrown out. The Uruk-hai then proceeded to launch an attack on Rohan, and the company, along with Theoden, his army, and his whole people, fled to Helm's Deep, and were there attacked by Saruman's army of ten thousand Uruks, which, with aid from Eomer and his army, they defeated.