The temporal duplicate of the original DeLorean that was created when that DeLorean was hit by lighting in 1955, sending it 70 years into the past to 1885. The temporal duplicate DeLorean was simultaneously sent 70 years into the future, to 2025.
At some point, Doc traveled to 2025, and was able to acquire the temporal duplicate DeLorean before Griff Tannen damaged the time stream. He then took both time machines back with him to the 19th century.
In May 1986, the temporal duplicate DeLorean arrived empty, as the automatic retrieval system had activated. Marty went back in time to 1931, and eventually helped the young Emmett Brown reconcile with his father. Edna Strickland stole the temporal duplicate DeLorean, and traveled to 1876. This left Marty stranded in 1931.
Marty was never told about where Edna's DeLorean came from, nor did he know whether Doc would have a DeLorean time machine in the new timeline. Thus, he left a note with the Western Union office to be delivered to Doc on January 3, 1985. He wrote that, since Doc knows that the time travel experiment will be a success, he should make a second DeLorean time machine, duplicate it to match the original DeLorean, and keep it hidden until he knows when to use it.
At some point in 1986, Doc upgraded the duplicate time machine to match the original as best as possible, right down to the money suitcase containing currency from multiple time periods. He then traveled to 1931 to bring Marty home.
Unfortunately, Edna Strickland arrived in 1876. She parked the temporal duplicate DeLorean in the Delgado Mine. In Hill Valley, she discoverd Beauregard Tannen's intent to build the Palace Saloon, and is angered that no one will stop him. Edna set fire to the Palace Saloon. The fire got out of control, and burned Hill Valley to the ground.
In 1931, Doc arrived in the second DeLorean and Marty hugged him telling him that he was glad to see him. Doc realized that something must have happened to an older version of himself. As Doc is about to take Marty home, the ripple effect rippled forward into 1931, and Hill Valley disappeared from existence.
They see a historical marker, with the date the Hill Valley settlement was destroyed by fire. Marty tells Doc that Edna went to that date. He explains that she stole a time machine that came from another timeline where Emmett married Edna and ran a totalitarian Hill Valley together, to a very surprised Doc.
Doc says they don't have time to discuss it any further, as they need to repair the timeline before they fade from existence themselves. Doc and Marty then from 1931 to 1876.
In 1876, Doc and Marty arrive in Hill Valley and discover Edna's Delorean in Delgado Mine. They free the miner who tells them that he was tied up by a "devil woman", who stated that she wanted to celebrate the opening of a new saloon.
Marty and Doc arrived just as Edna attempted to set fire to the Palace Saloon. Marty and Doc are able to stop her, however Beauregard Tannen showed up wanting justice for the attempted arson, blaming Marty and Doc, until Edna uncharacteristically accepted the blame.
Marshall Strickland arrived, and Tannen attempted to fire at Marty and Doc, but Edna pushed the gun away, accidentally igniting the gun powder. Marty dumped the barrels of alcohol on the fire, and it went out, as the alcohol had been watered down.
Strickland told Tannen to let things go, as Marty saved his life. He then tells Marty, Doc, and Edna to leave, as they don't belong in Hill Valley. Doc, Marty, and Edna travel from 1876 back to 1931.
In 1931, Doc made sure Edna turned herself in, to a puzzled Officer Parker. The temporal duplicate DeLorean lost its temporal cohesion shortly after Edna drove it from 1876 to 1931, and faded from existence.