Hormonal changes. The pill introduces hormones that prevent ovulation, therefore there is no egg to be fertilized. Furthermore you do not have a "period" technically. It is withdrawl bleeding from lack of hormones and if taken properly you are protected during this time as well.