Theoretically, it would go all the way through and then back, oscillating back and forth forever.
The brick would be exactly like a mass on a spring pulling it toward the center of the earth.
Momentum keeps it going through the center, but after that the spring is slowing it down.
The object goes all the way through to the center, picking up speed until it reaches its maximum at that point, then roars right through the center but starts slowing clown.
When the brick got to the other side of the earth, it would reverse direction, and if you didn’t stop it at that point, it would go back and forth forever.
The trip from one end of the tunnel to the other would take about forty-five minutes.
If the hole were slanted, between New York City and London, say, the one-way trip would still take the same forty-five minutes.
The distance would be shorter but the accelerating force of gravity would be weaker.
The explanation assumes that the hole goes from pole to pole, so that the earth’s rotation would not be a factor.
It’s also assumed it is lined with a vacuum tube, so there would be no air resistance, and finally that the brick is resistant to the heat of the earth’s interior.