The role of the stomach in digesting food is to break solid food down into liquid and nutrients by mixing it with acid and pulverizing it. The role of the pylorus (sphincter at the end of the stomach) is to close to keep solid food in the stomach until it is broken down. The pylorus then opens to let liquid and nutrients into the small intestine for absorption.
Gastroparesis (gastro = stomach and paresis = paralysis) results from damage to the nerves of your stomach and pylorus. When stomach nerves are damaged, it cannot pulverize food. When pylorus nerves are damaged, it no longer opens.