Etymology is the study of the history of words, their origins, and how their form and meaning have changed over time.
Lexicology is the part of linguistics which studies words. This may include their nature and function as symbols.