Am I taking the pill wrong??

Ash
My packet of pills come with 21 pills. My doctor told me to take my first pill the Sunday after I start my period. I started my last period on the 23 of October, I had finished on the 29th. I started my pills on the 25th because I assumed that's when I was supposed to. I am on my last week of pills before I start my new pack and I started my period today. 18 days early!! Should I have waited and started my pills the next Sunday? And why do I only have 21 pills? Do I stop taking the pill while I'm on my period? I thought my doctor explained everything but now I'm confused! This is my first time on the pill.