First of all, it should be mentioned that Archer is a Counter Guardian and not a Heroic Spirit. He is an agent of Gaia (the will of Earth) and is not stored in the Throne of Heroes like the other participants of the Holy Grail War.
Archer´s true identity is that of:
Emiya Shirou from an alternative timeline of the Fate route (Saber route), where he went into despair after Illyasviel passes away 1 year after the war. He tried to become a hero by saving the majority by killing the minority (like his father, Emiya Kiritsugu). Eventually the people he saved turned on him and shunned him, throwing him further into despair, culminating in him sacrificing his life by making a pact with Gaia to become a Counter Guardian in exchange for a few hundred people´s life. He is summoned into the war with the pendant he always carried on him that Rin used to save him as the catalyst, since Rin had no catalyst herself.
If you want a more indepth answer, play the visual novel, as the second route, Unlimited Blade Works, revolves mainly around him and Shirou.