Treif derived the Hebrew word teref which means torn, and originally referred to non-kosher meat only. In Exodus 22:30 it is written "Do not eat meat from an animal torn in the field." Thus Jews were forbidden to eat meat from an animal that was torn or mortally wounded.
Over time the meaning of the term treif expanded from one category of non-kosher meat to anything non-kosher.
More Kosher Vocabulary Words: Glossary of Kosher Terms
Common Misspellings: trayf, traif, trafe