Erlotinib is a targeted therapy drug used to treat certain types of cancer. It functions as an epidermal growth factor receptor (EGFR) inhibitor, which means it blocks the activity of a protein called EGFR that is involved in the growth and spread of cancer cells.