The word was invented by Richard Dawkins, an evolutionary biologist. He described ideas as reproducing with variation under selection pressure, which is the definition of the evolutionary mechanism.

There is a more recent use of ‘meme’ to refer to what we used to call an ‘internet image macro’. So the meme of the idea ‘meme’ has itself evolved to have a more specific variant of the general idea.