Lymphocytes identify foreign substances and germs (bacteria or viruses) in the body and produce antibodies and cells that specifically target them. It takes from several days to weeks for lymphocytes to recognize and attack a new foreign substance.