Edward Theodore Parker best known as Teddy Parker was a close friend and brother in arms of Booth's who served with him in the army. He was shot down and instantly killed at Booth's side during a snipe at the age of 20 and became the namesake of Booth's son, Parker.
He appears to Booth when the Gravedigger kidnapped him from his apartment and trapped him out at sea in the holding cell of a ship rigged to blow. Booth initially assumes that he is a hallucination caused by his having been drugged. Teddy acts as something of a spiritual guide as Booth fights his way to the ship's surface and it appears is able to physically assist him as he is seen performing tasks such as handing him objects. When Booth unconsciously grabs Teddy's uniform collar to hurry him along at one point and realizes the contact, he then decides that Teddy is a ghost.
Booth blames himself for Teddy's death saying, "You were so young," and believes Teddy should never have been on that mission because he'd been inadequately skilled. Teddy tells him that it literally wasn't his fault as he'd disobeyed direct orders. Booth had commanded him to get down twice but Teddy ignored in his anxiousness to get a shot off at the target. With this resolution, Booth confronts Teddy's high school sweetheart, Claire, for the first time at his grave on the anniversary of his death to honor Teddy's request for him to relay that he loved her.
Teddy, for a moment, seems to appear to and have a brief exchange with Brennan as well though his identity is unbeknownst to her and his interactions with the ship, most notably the setting off of the C4 blast that got Booth through the exit were apparent and alluded to her and others that Booth's escape had to have been orchestrated by two people, strongly suggesting that Teddy was, in fact, an actual ghost, not a hallucination.
When Booth is later revealed to have a brain tumor ('The Critic in the Cabernet'), it's left up for debate. A popular counter argument is that Brennan's encounter was seen from Booth's perspective and Booth had projected Teddy onto a random soldier.