For the Dharma plotline, go here.
So at the beginning of the episode we see a guy (YG) working on a loom and weaving a tapestry, then he goes fishing and cooks and eats a fish while watching the approach of a ship (the Black Rock). Then this other older guy (OG) sits down and they talk about the approaching ship and how YG brought the ship to the Island and how this time might be different. OG says that YG is trying to prove him wrong, but it always ends the same, they come, fight, destroy, corrupt. YG says it only ends once, everything before that is progress. And then OG says that he wants to kill YG and YG knows that but OG can't and that he will find a loophole one day. YG says he will be right here when he does and OG revels that YG is Jacob! and walks away. Jacob is on the beach next to the statue and it is whole and looks to be the alligator god Sebek.
So it is revealed that Jacob has visited and physically touched every one of the "significant" original Lostaways at some point in their lives: Kate and Sawyer when they were young, Jack after his first major surgery, Hurley after jail time for "killing" 3 people, Sayid right before his wife was run down and Jacob may have actually contributed to that one, Jin and Sun at their wedding, John after he was thrown out the window by his father and Jacob appears to bring him back to life, and Ilana after she was injured somehow asking her to help him. He seems to be setting events into motion without really doing anything, but wants them to go to the Island.
2007, John Locke tells Ben that he wants him to kill Jacob, that Locke isn't going to do it. Ben asks why and Locke says that after everything Ben did in Jacob's name and never having had the privilege to even meet him, it should be obvious. Ben says that he told his dead daughter he would do whatever Locke said and Locke is very interested in this. Richard takes them to the foot statue and reveals that Jacob lives there, not a cabin in the woods. In a conversation with Locke, he tells him that he is ageless because Jacob made him that way. Ben and Locke go into the statue base, Richard says to tell Jacob he said hi and goes, Locke gives Ben a knife and off they go.
The passengers of the Ajira Airways Flight 316 (the Passengers) are carrying around the big box and they decide to show Frank what was in it. Frank is horrified and says he wishes he hadn't seen that but Ilana says that something much worse than that is on the way or here or something. They go to Jacob's cabin to show him but the ash line has been cleared away in one spot and there is no one there. The cabin looks like it has been abandoned for some time and there is a piece of cloth with a picture on it stabbed to the cabin wall. She takes it and says that he isn't there and someone else has been using it. They burn it and take off for the foot statue. When they get there, they ask for "Ricardos" who is Richard and asks him "What lies in the shadow of the statue?" to which he answers "Ile qui nos omnes servabit" (He who will save us all) and that is the right answer. They dumped out the contents of the box which turns out to be John Locke dead.
Inside the statue, they find Jacob and Not!Locke says that he found the loophole and Jacob is like I see that. Ben asks if they know each other and Jacob tells him to leave so that Not!Locke and he can settle up their differences. Then Ben questions about why he wasn't good enough even though he followed orders obediently and never got to meet Jacob but Locke gets whatever he wants. Ben asks "What about me?" and I actually expected Jacob to say that Ben has no soul something but Jacob coldly says "What about you?" and then Ben stabs him in the heart 2 times and Jacob spits up blood and falls down. He says "They're coming" and Not!Locke makes him repeat it and then Jacob falls over and Not!Locke kicks him into the fire.