The first gyroscope was invented by John Serson in 1743 with various gyro machines coming in the following years. Some of the first mechanical gyros used two heavy brass discs spinning at high speed to detect changes in yaw. The earlier heavy and power consuming technology has since been replaced with modern non-mechanical alternatives that can do much more beyond yaw correction.
The small size and low power consumption of modern gyroscopes have made the technology indispensable to the aircraft, mobile devices and of course drone industry. This first 5 minute video explains precisely what a gyroscope is.