Oedipus Rex, by Sophocles, is a Greek tragedy which relies heavily on irony to entertain the audience as well as drive home its themes. In the lines you mention, Oedipus makes several ironic speeches which presage (foreshadow) what is to come.
The first one is found in lines 165-170. The king, Oedipus, is talking to his brother-in-law, Creon, about the mystery surrounding Laius's (the former king's) death. Oedipus says he will shed some light on the subject in an attempt to avenge his death and heal the blighted land. Then he says this:
This polluting stain
I will remove, not for some distant friend,
but for myself. For whoever killed this man
may soon enough desire to turn his hand in the same way against me, too, and kill me.
Thus, in avenging Laius, I serve myself.
As he speaks, the audience is quite aware that Oedipus is the one who killed Lauis; he is the "polluting stain" which must be removed in order for the land to be healed. His fear that the same person who killed Laius might come to kill him, too, is humorous (in a rather tragic way, of course); and his conclusion, that in avenging the death of Laius he will somehow benefit himself, is amusing to an audience that knows the truth. This is one of many times in the play that Oedipus condemns himself unknowingly.
This second quote is similar to the first in its irony but is much more specific, and Oedipus literally seals his own fate by issuing an official royal decree. In this speech (lines 280-292), Oedipus orders his people to reveal what they know about the murderer of Lauis (which of course is Oedipus himself). No one is to harbor him, give him water, talk with him, or even pray with him:
Ban him from your homes, every one of you, for he is our pollution, as the Pythian god
has just revealed to me. In doing this,
I’m acting as an ally of the god
and of dead Laius, too. And I pray
whoever the man is who did this crime,
one unknown person acting on his own
or with companions, the worst of agonies
will wear out his wretched life. I pray, too,
that, if he should become a honoured guest
in my own home and with my knowledge, I may suffer all those things I’ve just called down
upon the killers.
The last lines seal Oedipus's fate, for he prays that the man who murdered Lauis will suffer "the worst of agonies" which "will wear out his wretched life." Even worse, if the murderer is ever knowingly an honored guest in the king's home (which of course he already is), Oedipus calls down all the same curses as he called down on the murderer's head.
The audience knows what Oedipus has just done; he has unknowingly doubled the curse on his own life, ensuring a life of misery. The irony is delicious and horrifying at the same time, enciting sympathy and fear (pity and awe) in the audience. These are the classic elements in a Greek tragedy, and after hearing this speech the audience waits with trepidation and wonder to see how Oedipus will fall and his curses will engulf him.