Overview
In the first film, she is a mysterious but powerful figure, incongruously depicted as a cheerful old lady who enjoys smoking cigarettes and baking cookies. She possesses the power of foresight, which she uses to advise and guide the humans attempting to fight the Matrix. Later, she is revealed to be a sapient program who is integral to the very nature of the Matrix itself. Whether her power of prediction is deterministic or not is a concept given much treatment in all three films. She herself claims that she lacks the ability to see past her own choice, explaining that no one, including herself, can see past a choice they do not understand. It becomes clear in the films that her power cannot be used to predict the ultimate consequences of Neo, who possesses free will when he defies the Architect.
Her power of foresight, on the other hand, is probably not a foresight based on knowledge of a pre-determined future, but rather a calculation; The Architect revealed the Oracle to be "a program designed to investigate the human psyche"; thus, allowing the Matrix to become more accustomed for the majority of the human population to accept. She exhibits a trait for predicting events directly relevant to the nature and/or programming of the Matrix, and natural human responses according to her knowledge of them; this is most clear in her prediction of Neo's choice between Morpheus' life and his own. While the Oracle knew that the Agents would be searching for Morpheus as he was searching for 'the One', and seeing Cypher's actions and reactions (such as his conversation with Agent Smith), she predicted the most likely event. Another example is her prediction about Neo's choice in the second movie, The Matrix Reloaded; she had existed throughout five versions, and regardless of the One's ability to exhibit free will, she had experienced a series of events that had and would occur and push the One to the Source.
The Oracle is played by Gloria Foster in The Matrix and The Matrix Reloaded, and by Mary Alice in The Matrix Revolutions and Enter the Matrix, one of the franchise's video games. In The Matrix Revolutions and Enter the Matrix, it is explained that Kamala and Rama Kandra, the parents of Sati, traded with the Merovingian, giving the Oracle's termination code in exchange for their daughter's passage into the Matrix as an Exile via the Trainman. In reality, Mary Alice played the Oracle because Gloria Foster died of complications from diabetes before her role in Matrix Revolutions was shot.
In the third Matrix movie, the Oracle hints at her true purpose, which is to bring imbalance, rather than balance, to the equations that form the Matrix. In that she is opposed to her counterpart, the Architect, who brings balance to the equations that form the Matrix.
The Architect's aim is to reboot the matrix, by reuniting the One with the Source, bring about the destruction of Zion, having Zion starts over so ensuring control over the humans for one more cycle. This he has done many times. To help him, he created the Oracle. The Oracle's aim however now is to aid The One and the humans following him by means of the Prophecy (predicting the victory of the One and the fall of the machines), not in order to bring down the Matrix, but rather so that they can voluntarily disconnect themselves from the system, ensuring its stability while preventing its destruction.
This Yin-Yang relationship itself is a form of balance between opposing forces, so it becomes obvious that the Architect and the Oracle are the two balancing forces of the Matrix itself: the fallible human factor and the logic of the machines. This idea is even hinted in the films as the Oracle is wearing yin-yang earrings throughout the third film. This process of balance between opposing forces is even more realized in the conflict between Smith and Neo at the end of the third Matrix movie, wherein they annihilate one another, suggesting a collision between matter and anti-matter.
In the first Matrix movie, Agent Smith revealed that the first Matrix was a failure because it was too perfect for humans to accept. This has been revealed in The Matrix Online continuity as the Paradise version of the Matrix. The Architect confirms this (and his own responsibility for its creation) in the second movie, Reloaded, adding that he also created a second failed Matrix based on human history and nature (as he perceived it without the Oracle), which has come to be known as the Nightmare version of the Matrix. By including the Oracle, whose investigations into the human psyche yielded the answer to creating a functional simulation that humans would accept, a stable System was created with the third version of the Matrix, while the Prophecy of the One made to ensure its continuity in cycles.
In the final two films, the Oracle succeeds in unbalancing the Matrix (seeing the simultaneous rises of both Neo and Smith) to the extent that it is almost destroyed. In so doing, she manages to bring about a resolution in which the machines and the humans can coexist in peace. The Architect tells her she "played a very dangerous game" helping the humans, to which she replies that "change always is ". The Architect also promises to the Oracle that the humans desiring to be free from the Matrix will gain their freedom as part of the peacemaking between the humans and the machines. When asked whether Neo will return, she says she suspects that they will see him again, indicating that he may still be alive, or that he may be reincarnated.
Read more about this topic: Oracle (The Matrix)