Some words used to have a different meaning. For example, according to this link, here are a list of twenty words that originally had a different meaning from the connotation that we associate it with today. One example would be nice. Before nice meant silly, now nice means that a person is kind or the antonym of mean. Is there a single-word or phrase that describes the phenomenon. It kind of reminds of a paradigm shift in science, when an idea that was thought to be true is changed. For example, the heliocentric theory replaced the geocentric theory.
I think the expression you are looking for is semantic change (also semantic shift, semantic progression or semantic drift):
- is the evolution of word usage — usually to the point that the modern meaning is radically different from the original usage. In diachronic (or historical) linguistics, semantic change is a change in one of the meanings of a word.