R2-D2 has many different gadgets that can help him with different tasks. R2 has a electrical zapper to stun enemies, dual jets for maneuvering through the air, a holo projector for showing video, a buzz saw for cutting ropes and such, a manipulator arm that can lift objects and hack into computer networks, and numerous other gadgets.
R2-D2 was built to be maintenance aboard Queen Amidala's ship. R2 stayed dormant for a while but when Padme was escaping from the blockade around Naboo, their starfighter was damaged. Many different astromech droids went to repair the damage but were blasted away, one by one. In seconds, R2 was the only droid still alive. R2 fixed the damage on the ship and they escaped from the blockade at Naboo. R2-D2 was greatly honored for saving the ship and was cleaned up by Padme (who was pretending to be a servant to the Queen).
R2 joins Qui-Gon-Jinn and Padme as they go out to find a replacement hyperdrive. Later R2 meets C-3PO and they become friends. After Anakin wins the pod-race, R2-D2 and C-3PO go to Corusant to try to win the approval of the court. After this, R2-D2 heads back to Naboo and finds himself in a Naboo starfighter. Anakin and R2 fly off and destroy the huge Trade Federation Control ship.
After working with Anakin and Obi-Wan for ten years, R2 gets back into action. He is a sentry for Padme, but fails to recognize the sneaky Kohunns. Anakin senses that Padme is in danger and saves her from them. R2-D2 accompanies Padme and Anakin as they fly off toward Naboo. They go there but then go the Geonosis, where the battle is taking place. R2-D2 saves C-3PO in the battle of droids versus Jedi and wields C-3PO's head back onto C-3PO's body. They win the battle and R2 stays with Anakin.
Three years later, when General Grievous is on the loose, Anakin and R2-D2 fly into battle with Obi-Wan and R4. While Anakin and Obi-Wan look for Palpatine, R2 gets to fight when some super battle droids come in the room. R2 sprays them with oil so the slip and fall down, then R2 torches them with his jets which burns the droids to a crisp. After that he tries to rescue Obi-Wan and Anakin but gets ambushed. After Anakin turns to the dark side, R2 leaves him and gets sold. C-3PO gets his memory wiped, but R2-D2 gets to keep his memory.
After a long twenty years, R2-D2 is active again, working with the rebel alliance. Princess Leia gives R2 the readouts for the Death Star because their ship, Tantive 4, is getting pulled into a star destroyer. R2-D2 gets the information, then uses an escape pod with C-3PO, and doesn't get shot down because there is no life reading in the pod. R2 and C-3PO travel through the Tatooine desert and they split up. Both of them get captured by the same Jawa's though. R2 and C-3PO get sold to Owen Lars and Luke Skywalker. When Luke is cleaning up R2, he accidentally activates a message from Princess Leia. It tells of Leia seeking Obi-Wan's help. Later, R2 sneaks away in search of Obi-Wan. Luke discovers this and chases him down with his speeder. When R2 is found by Luke, Tusken Raiders ambush Luke and are about to kill him, when Ben Kenobi comes on the seen. Luke comments that he had never seen such devotion in a droid before.When Luke, Ben, C-3PO and R2-D2 find a ride to Alderaan, they take off in the Millenium Falcon, piloted by Han Solo and Chewbacca. After they get captured R2 finds Leia through the computer and Luke and Han go to rescue her. R2 saves all of them from being crushed and they all escape the Death Star. Later, R2 is co-pilot on Luke's X-Wing, and together they blow up the Death Star.
After the defeat of the first Death Star, the Emperor decides to start building a new one. R2 is at the rebel base on Hoth. The Empire find the rebel base and send down some AT-AT's. These huge walkers find the main shield to the base and blow it up. R2 escapes with everyone else.
The Second Death Star is still incomplete, but is now operational. R2 and C-3PO go the Jabba the Hutt with a message and are given over to Jabba also. On a sail barge, R2-D2 and C-3PO, escape just as the whole thing blows sky high. Luke and the others pick them out of the sand and leave the Sarlacc. R2 and C-3PO go with Han, Chewbacca, Leia, and Luke to destroy the Death Star's shield base on Endor. R2 gets captured by Ewoks, but gets released when C-3PO uses his dark magic. When R2 and the others are breaking into the shield base, a stormtrooper nails R2 with a blaster shot and makes him malfunction. After the second Death Star is demolished, R2-D2 is repaired and lives on as the legend.
R2 is now in the care of Cade Skywalker.