What is the history and origin of words known as?

I believe that "Etymology" is the answer you're looking for...