A NG tube is a nasogastric tube, they serve a couple of purposes. If someone is unable to eat for whatever reason, a nasogastric tube may be inserted in the nose (nare) and passed into the stomach. After the location of the tube is verified (you have to make sure it is in the stomach) the tube can be used for nutrition. You can accomplish this either by continuous feedings (on a pump that regulates the flow) or by intermittent bolus feedings (giving a certain amount/volume every couple of hours).
Verification of tube placement is important, this is done clinically by "air and auscultation". An air bolus, 30-45 cc , of air is injected into the tube while auscultating over the stomach. Tube placement can also be verified by chest xray (you visualize the tip of the tube in the stomach on the xray).
Besides nutrition, NG tubes are also used to instill medications directly into the stomach.