The D-Scanner was a device created by Ophanimon, one of the Three Great Angels, to allow humans to use the Spirits of the Warrior Ten, scan Digi-Code, and contain any Spirit. With them, one could Spirit Evolve, or Double Spirit Evolve. Ophanimon upgraded Takuya's and Kouji's in episode 35 so that they could be used the Hyper Spirit Evolve.
The Warrior Ten each created two Spirits to represent them in later times. The H (for Human) Spirits, and the B (for Beast) Spirits. So, there was an H and B Spirit for every element: Fire, Light, Ice, Thunder, Wind, Darkness, Water, Ground, Steel, and Wood. However, the H and B Spirits of Darkness were actually corrupted versions - when Ophanimon's energy purified them of Cherubimon's corruption, they became known as the L and K Spirits, because the H and B Spirits of Darkness already existed as the corrupted Spirits. L and K stand for Lowemon and Kaiser Leomon.