The words above are Latin, in case you've not come across them before. Literally translated, they mean "Remember Death, Remember to Live". All things must end, but it doesn't help us to dwell on that to the point where you forget to have enjoyed the time you have.
There's a deeper part to Memento Mori than just accepting that all things die though. That is, that no-one is so powerful or so important that they will live forever or even be remembered forever. It reminds us to be humble, that we are human and frail and no more enduring than the most or least powerful amongst us. It pays to be mindful of this, sometimes we can believe our own hype. Don't think too highly of yourself and likewise, don't be too impressed by others. They, too, will die.
There was an ancient philosopher named Diogenes who really believed that we're all fundamentally equal. To preface this story, I wouldn't suggest that he's someone to emulate completely, because he also was completely fine with never bathing, masturbating in public and pissing on randoms passing by... But that doesn't mean he also didn't have good ideas.
The story goes, one day Diogenes was basically chilling in the centre of town on a sunny day (where he lived in an abandoned barrel or something?). Alexander the Great had just returned from some war or other and all the important philosophers and statesmen of the time had shown up to offer him their congratulations (and probably also ask favours from literally the most powerful man in the world at the time). But not Diogenes. He was happy sunbathing.
Alexander had heard of Diogenes and some of his teachings, and decided to go visit him himself. It's important to remember that Alexander was not just powerful, but ruthless and not at all opposed to killing people (It's suspected he killed his father, and known that once his father was dead he went on and killed any cousins or family that might oppose him being king). So the most powerful man in world walks up to Diogenes and introduces himself, asking Diogenes if there's anything he wants - name it and it's his. This is Alexander the Great - that could mean cities, countries, wealth, power, literally anything available at the time. Diogenes looked up and said "Yes, move a bit to the left, you're in my sun."
Apparently, as Alexander walked away with his retinue he said "You know, if I wasn't Alexander, I think I'd like to be Diogenes..."