From Destinypedia, the Destiny wiki
This article is about the Ghosts created by the Traveler. For The Guardian's Ghost, see Ghost (Little Light).
Ghosts are small, sapient machines created by the Traveler shortly after the Collapse. Their sole purpose is to locate and resurrect deceased individuals capable of wielding the Light as Guardians, and to support their Guardian charge in combat.
Ghosts are floating machine entities slightly larger than a human hand. They consist of a spherical core with a single glowing "eye", which is surrounded by a "shell" of several pieces that can separate and rotate freely around the central sphere. The default Ghost shell consists of eight roughly tetrahedral segments colored white with orange highlights, but there is a huge diversity of shells available that Ghosts can adopt for cosmetic purposes.
Every Ghost has a unique personality and identity, though not necessarily a name. This personality may be intended to complement that of the Chosen they're meant to eventually revive,  and often they have a name coined by their Chosen, whilst others may take names they are given by others.
When a Ghost revives their Chosen, they are bonded together from that point forward. A "neural symbiosis" begins between them. Every Ghost has one specific person they are meant to revive. For some, their Chosen is a sort of "soul mate" and they know instinctively when the right remains have been found;  for others, they simply search until they find someone they feel is worthy of the Light or has a "spark". Many Ghosts have spent the time since the Collapse searching fruitlessly for their Chosen. In the worst case, their Chosen's corpse may be irretrievably destroyed before they could be revived, leaving the Ghost's quest eternally unfinished. 
Some Ghosts lose hope in ever finding their Chosen; these usually find some other way to make themselves useful, such as joining the Vanguard's covert Spectral Network, where they act as scouts and spies for the Vanguard. Ghosts that never find their Chosen may be referred to as "unconnected" or "unpartnered".
On revival, the Ghost's Chosen becomes a Light-bearing Guardian. Once a Ghost chooses, they can revive no one else. It is possible for a Ghost to bond to someone other than their original Chosen, as with Shin Malphur, though that case required special circumstances.
Destiny 2 reveals that Ghosts enter a temporary catatonic state when the Light is cut off from them. Much like their Guardians, the Lightless Ghosts are severely weakened and damaged. Worse, should the Guardians be killed, then they will be unable to resurrect them. Fortunately, at least one Guardian was able to regain their Light from a broken shard of the Traveler in the European Dead Zone.
For a Guardian, their Ghost serves as a companion, scout, librarian, and mechanic, waking ancient machinery and cracking ancient codes. Ghosts can support Guardians by performing certain actions such as illuminating darkened areas, repairing technology from the Golden Age, hacking into machines, informing Guardians of incoming hostile threats, calculating complex enemy behaviors, determine combat outcomes, mapping numerous projectiles and their myriad of trajectories, and providing communications. Most importantly, Ghosts may revive Guardians from death. As long as the Ghost survives, and barring special circumstances, Guardians are effectively immortal and may be resurrected fully intact from any death without consequences. The death does not have to be immediate, nor do they have to be revived in the same place they died.  Ghosts may also repair any injury a Guardian suffers in a matter of seconds, though can sometimes have such difficulty repairing Exo Guardians that it is easier to resurrect from scratch.
Ghosts have no special control over their Guardians' actions, other than talking to them, or potentially withholding the resurrection of a Guardian who becomes dangerously erratic or monstrous. 
Although Ghosts have been associated with human Risen for most of their history, it has recently been revealed that there is nothing fundamentally preventing them from choosing non-human Lightbearers; a subset of Ghosts have chosen Hive partners, beginning with Immaru being directed by the Traveler to resurrect Savathûn, the Witch Queen. These Hive Ghosts would become part of the Witch Queen's Lucent Brood, with Fynch, a renegade amongst them, stated that Savathûn and Immaru tricked a number of Guardian-less Ghosts to join them, claiming that the Hive were more deserving of the Light than humanity and would give the Hive Ghosts purpose. However, while human Risen often treat their Ghosts as friends and companions, the Hive Lightbearers are less generous in their treatment of the Hive Ghosts, with most treating them with contempt, suspicion and hostility. Immaru and Savathûn are the only known exception to this, as they treat each other as equals.
Due to the integral role the Hive Ghosts have to the Lucent Brood, the Guardians would have little choice but to target the Hive Ghosts to defeat the Hive Lightbearers to prevent them from rising again. The Guardian's Ghost, would view the Hive Ghosts as traitors to humanity and the Light, unable to understand the reasons in their choice of siding with the Hive.
After the Collapse, the wounded Traveler deliberately shed many pieces of itself. These pieces understood intuitively that they had a mission to raise a companion from the dead, their Chosen, and created mechanical shells for themselves. As far as the Guardians know, no new Ghosts are currently being made; each one lost is irreplaceable. It is unclear whether all Ghosts were made at once, or over a period of time; Immaru is stated to be among the oldest of the Ghosts, suggesting the latter. Despite their origin as pieces of the Traveler, Ghosts do not possess any special insight into the nature of the Traveler, or into other matters pertaining to the Light and Darkness.
Ghosts serve the important function of a narrative device, acting as a vehicle for important tasks such as informing players of new objectives, and also serve as a revive/respawn marker when a player's character dies during cooperative play. Ghosts notify players when another player/Guardian has left the area or is revived. A Ghost can assist to more quickly revive another fallen player by holding the X button on the Xbox 360/One, the square button on the PlayStation 3/4, or the E key on PC. This can only be done in close proximity to a fallen player's death location, marked by their Ghost. On occasion, while on missions, certain objects must be scanned either to progress the narrative or provide additional context to the Guardian, which is visually represented as the Ghost flying out and scanning the object of interest. For example, scanning a dead Cabal on Phobos will have Ghost describe what legion it's from.
For more information, see Ghost shells.
Ghost shells change the appearance of Ghosts. The Taken King adds defensive boosts and additional effects to ghost shells. Rare shells have a single perk, while legendary shells have several to choose from. Shells can be purchased from The Speaker, the Vanguards, or Lord Shaxx. As of Rise of Iron, Ghost shells marked with New Monarchy, Dead Orbit, or Future War Cult colors and symbols can be bought from faction representives.
Ghosts without listed Lightbearers are not known to have one, either stated outright or simply never mentioned.
List of appearances