Where in Oedipus Rex by Sophocles do we learn that Oedipus killed his father and married his mother?
Like nearly every Greek play, Oedipus by Sophocles begins in what is called "in medias res," which means in the middle of the action. The play begins long after the two actions you mention (Oedipus killing his father and marrying his mother), but the events are revealed to Oedipus slowly as the play unfolds. The audience, on the other hand, would have been familiar with the story and knows much more than Oedipus does before the play ever begins. This serves to add to the irony and the audience's sense of pity and awe as they watch Oedipus fall from his high place without ever really knowing it is coming. (It's kind of like knowing there is going to be a train wreck and yet not being able to look away because you want to see how it happens and who gets hurt.)
Specifically, we learn the truth from the blind prophet Tiresias, though he speaks in rather veiled terms that Oedipus is too "blind" to understand. Creon is more direct and accuses Oedipus of killing the former king, Laius--though he does not know Oedipus's true relationship with Laius any more than Oedipus does.
Once the prophet and Creon both leave, Oedipus begins to ask some questions and it becomes clear that he is starting to realize his horrific past. Starting at about line 845 in the English translation numbers of the version I'm looking at (I've linked the site for you, below), everything begins to unravel for the prideful king. He starts with this:
Creon claims that I’m the murderer—that I killed Laius.
A little further on, Jocasta explains how and why they got rid of their son, but that does not really register with Oedipus yet. He is stuck on the details of Laius's murder. He says:
I thought I heard you say that Laius was murdered at a place where three roads meet.
Even after he figures out that he is the man who murdered Laius and therefore brought curses to his city and places curses on his own head, Oedipus still does not realize that Laius was his father and Jocasta is his mother. In lines 984-982 or so, Oedipus is still worried that he may yet murder his father (Polybus) and marry his mother (Merope).
It is not until he has called for the two witnesses that Oedipus begins to understand the horror of his situation. The man who witnessed the murder tells his story, and the shepherd who saved Oedipus's life tells his. Jocasta and the chorus (which means everyone else) figure it out before Oedipus; however, in agony, he finally says (in lines 1418-1422):
Ah, so it all came true. It’s so clear now.
O light, let me look at you one final time,
a man who stands revealed as cursed by birth,
cursed by my own family, and cursed
by murder where I should not kill.
The full revelation of the truth is slow to unfold so the audience can truly experience those two things--pity and awe--which are the hallmarks of a Greek tragedy.