How does the pill work around my period?

I just finished my weeks worth of sugar pills, are you allowed to have sex while taking the sugar pills?

What about the first day after starting the hormonal pill? Is that day safe too?