Jack Harkness, aka "Captain Jack", is from the 51st century and was a 'Time Agent' for a period in his past, before leaving the organization and striking out on his own with a stolen time ship built by a race called the Chula. His true name is unknown. He has appeared as a captain in the British Army in India in 1909. In 1941 he assumed the identity of one Captain Jack Harkness, an American volunteer pilot for the Royal Air Force who was killed in action. Jack's time ship was destroyed saving the Doctor and his companion Rose Tyler from a German bomb during World War II, and he joined the TARDIS crew.
Harkness was familiar with the technology of the TARDIS and came in handy making repairs on many occasions, as well as having useful military experience. Harkness was only with the Doctor and Rose for a short time, however, before he was killed on the Game Station during the reemergence of the Daleks in the far-flung future. When Rose absorbed the power of the Time Vortex, she brought Jack back to life, but neither seemed to be aware of this and they left him behind during the chaos of the Doctor's regeneration.
After being abandoned by the regenerated Doctor and Rose, Jack found his way to modern Cardiff where he heads the local branch of an organization called Torchwood, a group of secret investigators specializing in crimes involving aliens and charged by the British government with investigating alien technology. Jack continues to dress in WWII-era garb, including his RAF Group Captain insignia, and carries a Webley revolver as his preferred sidearm.
Ever since he has been brought back to life, Jack can't die. Literally.