If we do not consider the heat of the inner part of the earth (otherwise the ball will melt) , and considering the hole to be continuous from the north pole to the south pole, the situation would be something as follows:
We know Newton's Universal Law of Gravitation, which states that the Gravitational Force acting between any two objects is
F = G m₁m₂/r²
where G is Gravitational Constant
and r is the distance between the centers of two bodies.
Now, Gravitational Force is inversely proportional to square of distance.
So, the law means that the gravitational force increases as we move towards the centre of the earth and decreases as move away from the centre of the earth.
As the ball is thrown in the hole from one of the poles, it moves towards the centre of the earth with uniformly accelerated motion. At the centre of the earth, its velocity is maximum. However, when it passes the centre of the earth, it is moving against the gravitational force (like an object thrown vertically upwards from the surface). So, gravity pulls it back to the centre of the earth. The ball oscillates around the centre of the earth, and eventually gets settled at the centre of the earth.
Thus, you can finally imagine the ball being stationary at the centre of the earth.