does the morning after pill fail sometimes?

This might be confusing I'm not sure...anyways...I started birth control had only been on it for 4 days (I know you need to wait a month) and me and my boyfriend had sex he came in me pretty deep so we went to planned parenthood and got the morning after pill but yesterday 3 days after we had sex I had mild cramps and discomfort but I'm not due for my period for another 19 days....also last night I had a very vivid dream about me in the doctors office getting an ultrasound and finding out I was pregnant with a girl...do morning after pills not work sometimes? Has this happen to anyone