Philology is the study of language in written historical sources; it is a combination of literary criticism and history. It is often thought of as a precursor to the study of linguistics.
J. Piele. Philology. Macmillan, 1880.
Several branches of Philology:
The comparative linguistics branch of philology studies the relationship between languages. Similarities between Sanskrit and European languages were first noted in the early 16th century and led to speculation of a common ancestor language from which all these descended. It is now named Proto-Indo-European. Philology's interest in ancient languages led to the study of what were, in the 18th century, "exotic" languages, for the light they could cast on problems in understanding and deciphering the origins of older texts.
Philology also includes the study of texts and their history. It includes elements of textual criticism, trying to reconstruct an author's original text based on variant copies of manuscripts.
Cognitive philology is the science that studies written and oral texts as the product of human mental processes.
D. C. Greetham. Textual Scholarship: An Introduction. Psychology Press, 1992.