According to Wikipedia the earth's mantle is approximately 2900 km (1,800 miles) thick.
How is it possible to achieve such measurements?
Obviously we haven't sent anything down that far to check.
You are right...noone ever was able to make a borehole that deep. The two deepest boreholes are about. 12.300 m (40.400 ft) - those are the Kola Superdeep Borehole in Russia and the Al Shaheen oil well in Qatar.
So how do we measure the thickness of our subsurface? Think of the earth as an onion with different layers. Each of those layers (lithosphere, asthenosphere, mesospheric mantle, outer core, inner core) contain different mechanical (and chemical) properties. Due to this it is possible to infer indirectly the depth of each layer by using the travel time of refracted/reflected seismic waves (those come from earthquakes).
As mentioned before, each layer contains different mechanical properties, thus making the seismic velocity different in each layer. So on the border of each layer, those changes cause refraction or reflection if large increases in seismic velocity are involved.
Conclusion: no direct measurements possible, only indirectly derived measurements by the speed of travel from seismic waves.
Very important is that the outer core being liquid (and mantle solid), shear waves from earthquakes cannot travel through the outer core. Along with refraction and reflection of P-waves at the core-mantle boundary, this S-wave shadow makes it possible to figure out how far down the boundary is.