He lost his eye when he fought Itachi (Itachi was using a sword and the scar looks like it could have been made by a sword). Kakashi was there with his Uchiha friend. Itachi spared Kakashi since he wasn't a Uchiha. So Kakashi took his best friends eye (a woman, Kakashi's lover) and implanted it into his bad eye (so they can always be together).

Whatever.....

More importantly, who took care of the implant. It must have been a powerful medic ninja. Maybe someone like Kabuto's father/grand father.