Then learn what it means to be our enemy before you learn what it means to be our friend.
~ The Oracle, punishing Captain Kirk.
The Oracle of the People is the antagonist of the Star Trek episode "For the World is Hollow and I Have Touched the Sky".
Several thousand years ago, the Oracle was built as the control computer for the Fabrini generational ship Yonada in order to evacuate a portion of the Fabrini from their homeworld to Daran IV as their star Ganidra entered the final phase of its life.
Initially the Oracle served as a guide for the Fabrini people, with the Instruments of Obedience only used on criminals to ensure they did not reoffend. Several thousand years after the journey began, with the Yonada in serious danger, a series of revolutions took place on board the ship. The final revolution saw the Oracle reprogrammed into a tyrant by a group of religious fanatics, and the Instruments of Obedience implanted into everyone.
For the remainder of the journey, the Oracle acted as the absolute ruler of the Yonadi. Using the Instruments of Obedience it punished any Yonadi who had thoughts it didn't like, and murdered those who presisted. During the final years of the journey the Oracle malfunctioned, and drifted off course into a collision course with Daran III.
In the mid 23rd century, the ship was on its final approach to the Daran system. The USS Enterprise encountered the Yonada on the outskirts of the system when the Oracle fired missles at her. The crew of the Enterprise discovered the Oracle was nothing more than an advanced computer, and with the help of High Priestess Natira were able to fix the Oracle.
A year later the Yonada arrived at Daran IV, which the Yonadi named Lorina. The first few years on the new world were difficult for the former Yonadi, and a group of extremists were able to board Yonada and briefly reactivate the Oracle in order to have the Oracle impose order on the Lorina. Their leader Dovraku forced Spock to mind meld with him and the Oracle. Spock was able to overcome both in the mind meld and find a hidden archive that contained the true origins of the Oracle.
With this new information the Oracle was able to return to its original purpose of being a common ground for all of the Yonadi.