Goblet cells are modified epithelial cells which are associated with the function of formation and secretion of mucus.
They are present in the alimentary canal mostly in the intestines.
The main function of the mucus is to protect and lubricate the surface of the intestine.
Enzymes secreted for the process of digestion have acidic pH in the stomach and basic pH in the intestines. This can cause harm to the wall of the alimentary canal.
Mucus forms a coating over the wall and thus protects it from the digestive juices secreted in the alimentary canal.