The Morning After Pill

How long does the pill stay in your system? And can you take the pill the day you’re meant too get your period but you haven’t gotten it