Noel Khan leads the girls to Ali.
Ali says "I'm ready to tell you everything. But if we can't figure it out tonight, I'll have to disappear again. And this time it will be for good."
Ali answers a lot of questions, and we see a lot of flashbacks.
Somewhere amongst the flashbacks, Ali finds a note on her mirror saying "I'm everywhere. And soon you'll be nowhere. -A"
Turns out, Jessica DiLaurentis buried Alison, thinking Ali was dead. She saw the person who hit Ali on the head, and by burying Ali, was protecting the person who hit her.
After Ali was taken to the hospital by Grunwald, Mona came and picked her up. Mona is the one who convinced Ali to disappear.
Emily sees a shadow outside the window of the club they're sitting in.
The girls stand up as A attempts to shoot Ali.
A misses.
The liars follow Ali up to the roof of the building.
The girls are on top of the building when Ezra shows up.
A arrives moments later.
A shoots Ezra.
Ezra and A fight.
Somewhere here, Ezra says (to A) "I know who you are and the police are on their way."
During the fight, Hanna get a hold of the gun.
Hanna points it at A, and this is where the girls tell A to take the mask off.
A then jumps off the roof and grabs hold of the ledge down below.
The episode ends with A dragging Jessica DiLaurentis's corpse somewhere.
SIDE NOTES:
Jessica Dilaurentis dies
The "ultimate A" is Cece's twin -- aka, the woman in black from Wilden's funeral
Yes, Ezra does survive, but it isn't revealed till the 5th season.
Somewhere in 4x24, Jessica DiLaurentis is at the police station. Cece is lead across the lobby handcuffed. She locks eyes with Jessica, who is talking to Holbrook. Jessica nods. There is some agreement between the two of them.
Jessica says to a cop somewhere in this episode "I just found out that my daughter's still alive. That's all I'm thinking about right now.