Damn Gyroscope. I’ve a degree in physics and I still have trouble with how gyroscopes do the thing, but here goes.
A gyroscope is a spinny wheel in a metal frame, that metal frame is a gimbal. That cuts friction and other forces to keep it spinning longer.
As for the not falling over when it CLEARLY SHOULD, that’s due to precession. Precession is when a top (or other, like-minded spinny thing) starts to spin in a circle.
Imagine you’re looking down at a top spinning clockwise. Gravity, being the fickle mistress she is, tries to pull the top over. Say it pulls to left, Then the bit at the very top and very bottom is suddenly angled in direction. The bit at the top (of the top) is now angled downwards. Inertia doesn’t like this, it resists the change. The only way it can do that is a force pushing upwards. With just enough to keep it from falling, but it’s off centre, so you get this spinning.
I’m not convinced that it isn’t devil magic though.