Season 2, Episode 25: "unmAsked"
The four girls discover that Alison had checked into a motel off the beaten path before she disappeared. Spencer and Mona Vanderwaal (Janel Parrish) make their way out to the motel where they find A's lair. Meanwhile, the others are at a school masquerade dance.
Spencer begins looking through the motel room, which is filled with photos of the girls and other items. In true smart Spencer form, she figures out that Mona is the person who has been stalking, blackmailing, and hurting the girls just in time to turn around and see her in a black hoodie. Spencer gets knocked out, and Mona sends a video message to Hanna, Aria, and Emily to get them to leave the dance. Mona (or A) falls off of a cliff, but lives through it.
And just when you think now that we know who A is, the show is over, Mona gets sent to the Radley Sanitarium and it appears that she wasn't working alone.