Afatinib is primarily used in the treatment of non-small cell lung cancer (NSCLC) with specific mutations in the EGFR gene. It is also being studied for its efficacy in other cancers such as head and neck, breast, and colorectal cancers. However, its use in these other cancers is not yet as well established as it is in NSCLC.