I think it might be of use to show you the difference between uracil and thymine

They are very similar structures. The part that is involved in base pairing is actually the Nitrogen and the oxygen furthest from the sugar. See below:

So having an extra methyl group on the other side of the molecule does not interrupt basepairing. And remember, with DNA/RNA synthesis you have a template, and the new strand is based on the template. So, when the RT enzyme Medhat mentions encounters an adenine in the template RNA, it will pair it with a thymidine. And when it encounters a uracil, it is able to pair it with an adenine. The enzyme is structured specifically to only allow in thymine and not uracil, which is how it makes the distinction.