Oedipus is approached by a group of people led by a priest at the opening of the play. They ask Oedipus for his help in healing the city and solving its grave problems, telling him about what is going on in Thebes.
Thebes has been beset with...famine, fires, and plague...widespread suffering and death among their families and animals, and their crops have all been destroyed.
The troubles in Thebes are seen to be a sign of something spiritual or supernatural afoot in the city. Oedipus is a natural choice to approach for help because he has helped the city before and has become its king. (Earlier in his relationship with Thebes, Oedipus solved the riddle of the Sphinx then married Jocasta, becoming king.)
Oedipus agrees that the troubles are very serious and something must be done. The source of the trouble must be rooted out. He, of course, does not realize that his own transgressions are the cause of the trouble in Thebes. Oedipus himself is the root of the trouble.
His search for the cause of the woes in Thebes are necessarily ironic then as he searches for himself, calling far and wide for experts and for advice, seeking the truth about Thebes which ends up being the truth about himself.
True to his oath, Oedipus leaves the city when he finally finds out that he is the source of the problems in Thebes.
On the surface, the problem afflicting Thebes is a plague. But, when Oedipus sends Creon to discover the source of the plague, he learns it springs from a moral problem: the murderer of Laius, the former ruler, has never been found, but now must be brought to justice if the city is to heal. Oedipus curses the murderer and insists he will find him. He is unable at first even to conceive that the murderer might be himself.
On a deeper level, Thebes' problem is that Oedipus has been defying prophecy, believing that he can escape his fate, which is to murder his father and marry his mother. In trying to escape this destiny, he falls into it, killing Laius, his father, on the road (an act of pride, as Laius won't move aside for him) and marrying Jocasta, his mother, not understanding their kinship relationship. He thinks he knows who his parents are, and he unknowingly curses himself: the play teaches that he is in fact blind to what is really going on. This hubris or over-confidence in his own powers on the part of a leader causes suffering (plague) to the common people.