It's the absence of the hormones in the pill that trigger your period. It takes a few days for the levels to drop when you are taking the "inactive" pills. Once the levels do drop - you have your period.
You can have sex anytime. You are protected. The idea is that you are NOT fertile while on the inactive periods. You are either on your period or it is just afterwards. Pregnancy is unlikely.
Check with your pharmacist or doctor for clarification.
Hope it helps.