In Star Wars Episode IV: A New Hope C-3PO is introduced to the audience in the opening scenes of the film. C-3PO and R2-D2 are aboard the consular ship Tantive IV when it is attacked by Darth Vader's Star Destroyer Devastator. R2-D2 tries to leave the ship on the orders of Princess Leia Organa to deliver a secret message to Obi-Wan Kenobi.
C-3PO follows R2-D2 and they evade the troops using an escape pod and land on the planet Tatooine. C-3PO and R2-D2 are captured by Jawas and taken into their Sandcrawler.
In the process of being sold to Owen Lars, a Tatooine homesteader, C-3PO convinces Owen and his nephew Luke Skywalker to buy R2-D2 as well.
C-3PO is a humanoid robot shown to have protocol as his primary function, along with programming of other units, translation and etiquette. In the film C-3PO is a foil to R2-D2's jokes, even though C-3PO has to translate R2-D2's machine speech consisting of clicks, whistles and tones for the audience. C-3PO was the property of the captain on the Tantive IV but seems to follow R2-D2 in a relationship akin to those between human children.
Indeed C-3PO and R2-D2 are interdependent with C-3PO showing an emotional need, often following R2-D2 around, and R2-D2 needing C-3PO to translate for him.
Star Wars: Droids, also known as Droids: The Adventures of R2-D2 and C-3PO, was an animated television series that featured the exploits of R2-D2 and C-3PO, the droids who have appeared in all six Star Wars films. The series takes place between the events depicted in Star Wars Episode III: Revenge of the Sith and Star Wars Episode IV: A New Hope.
Over the course of the series, the droids team up with four different sets of masters. The first season is divided up into three cycles: at the beginning of each, the droids usually run into their new masters in an accidental way, and at the end of each cycle, they usually are forced to leave their masters for one reason or another.