How do phagocytosis and endocytosis relate to each other?
They are related in a few ways.
There are a mode of transport of substances.
With terms of just the CSM's function of transport the mean the same where the CSM's shape is modified, engulfing the extra-cellular particles and then cutting its ends to form a vesicle and bringing it into the cell. Endocytosis' meaning would stop here.
Under terms of immunity phagocytosis plays a major role. The phagocytes; macrophages and neutrophils use this method to engulf and destroy pathogens.
Endocytosis is just a method of bulk transport, similar to the mode of phagocytosis.