Geodesic Ending Point A geodesic is the path that an object follows in its world line. It maximizes its proper time given a starting point and an ending point. That's why things move in a straight line in a flat spacetime. That's the reason falling bodies accelerate.
Now, what sets the ending point of a geodesic? I mean, why should an apple fall towards the earth, rather than wandering off towards some random point following its geodesic between the tree and that point?
 A: You're saying that a geodesic is determined by its two endpoints, and we only know one, so there are infinite possibilities.
But a geodesic is also determined by its starting point and its initial direction at that starting point.
Now, if you only think about space and forget about time, you might say: the apple was not moving initially, so it didn't have a direction.
But in spacetime, any object is always moving, along its own direction of time.  So until it broke off the tree, the apple was always moving in the same time direction as the tree, the ground, etc.  But it was not following a geodesic, because it was not in free fall.
When it broke off, it entered free fall, so it started to follow a geodesic, but its initial (timelike) direction in spacetime was still that of the tree.  So that is the direction that determined which geodesic the apple would follow.
Now, the Einstein equation says that since the Earth has mass, geodesics that are initially "comoving" with it (maintaining their distance from it, as the apple was), will converge toward the earth as time progresses.  So that's what the apple does.  But the tree and all other supported objects are prevented from following geodesics by the force from the ground that holds them up.
EDIT: In your comment, you ask, if clocks run faster farther from the ground, why doesn't the apple maintain its height or even veer upwards so it can maximize its proper time as much as possible.
I agree this is a confusing subtlety!  Here's the thing: even though you only need a point and direction (physically a velocity, as you say) to determine a geodesic, your first sentence in your post is still right: a geodesic maximizes the proper time given its two endpoints (again -- endpoints in spacetime, not just space).  More precisely, it maximizes proper time between any two points that lie on it, relative to any other path between those same two points (technically, "any other infinitesimally close path").
Let's take the imaginary case where the apple maintains its height for 10 seconds.  You're right, that path has more proper time than the one that falls to the ground.  But they don't have the same endpoints.  Instead, we have to compare the constant-height path to other paths close to it, that start and end at that height and time.  And then we could find one with longer time: the one where the apple rises and falls in a parabolic arc, because then it eats up more time near the top of the arc.
But we know the apple can't follow that parabolic arc, because the initial direction (velocity) of the arc is away from the earth, whereas the apple was comoving with the earth when it broke off the tree.
Whereas, if the endpoints are (1) the branch of the tree at the time of breaking, and (2) the ground a few seconds later, and you compare all possible paths between those two points, you'll find that the one with the longest time also happens to have the same initial direction the apple did!  So that is the one it takes.
It's true that there is something a bit unsettling in the language here.  How did the apple know that, if it chose to accelerate downward at $9.8\ \frac{m}{s^2}$, its path would end up being that of longest time between its endpoints...without knowing the endpoint in the first place?
As usual, 2D surfaces provide a helpful analogy.  If you want to follow a geodesic along a surface, all you have to do is "follow your nose".  Imagine you're an animal who lies close to the ground and has a long nose, and you can flex your spine back and forth but not side to side.  If you just keep inching forward to the point where your nose is, that is, "keep walking straight", then no matter how the surface is curved, you will follow a geodesic.  This can be proven, though I'm not really familiar with that.  So just as we can sense what it means to "keep going straight" along a surface, objects can sense how to "keep going straight" in spacetime.
But mathematically, your original statement is still the fundamental definition of a geodesic, at least for relativity.  A geodesic is the maximal-time path between any two points on it.  However, it turns out that as you take the limit as those two points approach each other, you get a nice differential equation that is more useful for determining geodesics in practice, and illustrates why you only need a point and direction.
A: 
Now, what sets the ending point of a geodesic?

Geodesic means free fall by definition. Hence the "ending point of a geodesic" coincides with the point where the free fall of an object ends, which is the case if the object feels a force. Imagine a rocket in deep space which is in free fall. In the moment when it's propulsion is started it's trajectory is no more a geodesic.
The apple has no choice to fall somewhere. Its geodesic in the earth's gravitational field is determined by curved spacetime, so the only choice is to fall towards the earth's center of mass. And it's geodesic ends with the force of the impact.
Another "ending point of a geodesic" coincides with the end of the free fall of an object into a black hole. The fall ends in the singularity which can be interpreted as a point where time ends. See "geodesic incompleteness": https://en.wikipedia.org/wiki/Penrose%E2%80%93Hawking_singularity_theorems
