The chorus is an important part of any tragedy or comedy, but it is especially so with Sophocles. The chorus is much more integrated. At the outset of the play we see the chorus in full swing, they set the stage as they describe in lurid details the plague that has come upon Thebes. Moreover, they describe what must be done to solve this problem, that is, they must find out who killed Laius, the former king.
After this initial introduction, the chorus can be seen as a advisory body. They constantly give Oedipus advice. Usually they tell Oedipus not to rush into things and be too rash. They know something of the Greek wisdom of "nothing in excess," which was one of the mottos written at the Oracle of Delphi.
The chorus also comes into the play at vital times to stem the passions of Oedipus. For instance, they win him over and he does not kill Creon or even banish him. Had he done this, his fate would have been worse.
In the end, as all things are made clear and brought to light, they lament the fate of a great man with a tragic flaw.