If you are trying to prevent pregnancy after an act of unprotected sex or contraceptive failure, it is referred to as emergency contraception, which is basically a dose of hormones (higher a dose than what is in regular birth control pills) in order to prevent ovulation (up to 89% effective at doing so if taken within 72 hours of the act of sex). Commercial brand names of such emergency contraceptives are Plan B and Next Choice, which are available over the counter at any local pharmacy.
Now that such EC is FDA approved and available, that is typically what is recommended. However, because the hormones in EC are the same as the hormones in birth control pills, just in a higher dosage, it is possible to take birth control pills in such a way that they act as emergency contraception.
Here is a chart explaining which pills to take and when in order for them to work as emergency contraception; unfortunately, I do not see Diane 35 listed there, so I have no idea how one would effectively use Diane 35 as EC: