When patients can no longer eat by mouth (sedation, coma, swallowing problems...) they can be fed through a probe placed in the stomach: the gastric tube. This is called enteral feeding.
Another possibility if the digestive tract is not functional is to pass food directly through the veins by infusions (parenteral nutrition). Foods are administered in liquid form and cover all the needs of the patient.