Erlotinib is used to treat certain forms of non-small cell lung cancer that have spread to surrounding tissues or other sections of the body in patients who have had at least one previous chemotherapy treatment and have not improved. Erlotinib is also used in conjunction with another medication to treat pancreatic cancer that has progressed to nearby tissues or other sections of the body and cannot be treated surgically. Erlotinib belongs to a family of drugs known as kinase inhibitors. It works by preventing an aberrant protein from signaling cancer cells to proliferate. This aids in slowing or stopping the spread of cancer cells.