Phagocytosis is a process of endocytosis in which a living cell engulfs or ingests other cells (like bacteria) or other materials (like debris) to protect the body.
Phagocytosis occurs in specialized cells known as phagocytes(like neutrophils, macrophages, etc.) that possess receptors in their cell membrane.
The materials that will be engulfed get attached to these receptors first. The attachment of the material to the receptor leads to the folding of the cell membrane of the phagocyte forming a vesicle.
This vesicle formed by the folding of the cell membrane during the process of phagocytosis is known as a phagosome. The phagosome is responsible for the degradation of the materials.
The degraded materials are then removed from the cell by a process known as exocytosis.