The engulfing and degradation of microorganisms; other cells that are dead, dying, or pathogenic; and foreign particles by phagocytic cells (phagocytes).