The primary function of eosinophils is to combat parasitic infections and participate in inflammatory responses, especially those related to allergic reactions. They release toxic granules to destroy parasites and modulate the activity of other immune cells by releasing cytokines and chemokines.