The Season 7 midseason finale of Pretty Little Liars ended with the reveal that the Hastings family had even more dark secrets than fans knew. After an unknown person (presumably A.D., whoever they are) shot Spencer in the shoulder, Mary Drake appeared out of nowhere to cradle Spencer in her arms as she bled out. The girls were understandably horrified, wondering if Mary had had something to do with Spencer's injury, but Mary swore that she would never hurt Spencer. And there was a very good reason for that: Mary Drake is Spencer's mom on Pretty Little Liars.
At first, it was hard to be sure that that was the truth. Mary Drake has been a strange and enigmatic figure since she first appeared in Rosewood, and she definitely had ulterior motives that no one knew about. But everyone knew that she had a second child, even if they had no idea who that child was; without knowing if Mary could be trusted, her reveal about Spencer could have been another of A.D.'s games. However, when Spencer sat down to ask her mother Veronica about it, she received a heartbreaking confirmation. Mary Drake was her biological mother, and her parents had been lying to her for her entire life.
According to Veronica, Spencer's father Peter was the victim of some kind of Sweet Valley High plot twist at the hands of Jessica DiLaurentis' identical twin Mary Drake — except this was worse than anything either of the Wakefield girls could cook up. Shortly after Peter's affair with Jessica, he ran into her at a restaurant and they slept together again, except it wasn't actually Jessica. It was Mary posing as Jessica. And their affair resulted in a pregnancy.
Mary ended up back at Radley after that, which was partially what motivated Veronica to adopt the baby herself. She couldn't bear the thought of the child being born in an institution and adopted by strangers, or getting lost in the system. Instead, she arranged to take Spencer in and stay with Peter despite all the pain he had caused her (though to be fair, he was a victim, too, in this specific instance). And as soon as Veronica held Spencer in her arms, she knew the baby was hers.
The scene where Veronica revealed all of this to Spencer was heartbreaking. In her mind, there was no doubt that Spencer was her child even though they were not biologically related; she loved Spencer and would protect her at all costs. But all Spencer could see were the lies she had been told her entire life. The revelation about her birth mother seemed to give Spencer an identity crisis, and it looked like it would take some time before she could trust anyone in her family again.