The Morning After Pill contains a form of the hormone progesterone, and works by preventing the release of an egg from the ovary OR by making it less likely that sperm can fertilise an egg. It does not cause an abortion if a pregnancy has already begun.
It’s important to realise that the Morning After Pill is not just for the morning after sexual intercourse- it can be taken for up to several days after unprotected sex has happened (though the sooner, the better). The specific time frame during which it can be taken depends on the type or brand of progesterone.