What is plan b?

Don't judge me, i've never had education about sex and everything (I know it's horrible...) .

Is plan b the morning after pill?

It means you take the pill in the morning when you wake up after an unsafe sexual intercourse, although you took it the day before ???

Is that right?