There are several ways to induce vomiting in humans. Without getting too specific, they are all linked through the “vomiting center” of the brain, also known as the area postrema. The “vomiting center” is capable of responding to many different types of poisons, toxins, conditions, etc. In the case of eating something bad, remember that the stomach is a highly vascularized zone that also happens to have a massive nervous structure called the enteric nervous system.
Usually food poisoning that involves vomiting is caused by organisms that have preformed toxins, including but not limited to B cereus and S aureus. That delicious looking potato salad is teeming with toxins that have been pre-made by the bacterial species to wreak havoc on whomever might eat it. These toxins work within hours, causing inflammation in the gut. This information gets relayed back to the vomiting center. Once the brain registers that something is not right in your tummy, it stimulates muscles to close the pyloric sphincter (bottom of the stomach) and open the cardiac sphincter (top of the stomach) before activating the abdominal musculature and diaphragm to propel the harmful substance out of the stomach via forceful contraction.
What about a “strong” vs “weak” stomach? A lot of why people throw up is mental – you have incredible subconscious control over puking. Or it could have to do with innoculum – give someone a large enough dose of toxin/bacteria, and they’ll blow chunks.
The funny thing about it, you need your brains “permission” to puke, but your gut doesn’t need your brains permission for diarrhea. If for some reason you ate something wacky that managed to get past the brain’s vomiting center detection, your intestines will flush with extreme prejudice. Sometimes, a group of people who eat the same bad food can experience either symptom – vomit or diarrhea.