My boyfriend keeps throwing up and has diarrhea. Do you think he ate something bad?

Could be. There are many reasons for vomiting and diarrhea. Is he having other symptoms such as fever? Did the symptoms develop after eating a specific food? Is anybody else affected? Answers to these questions can help narrow down whether this is a food-related problem, an infection or some other underlying problem . If he is not at least keeping in fluids he should see a physician for a workup.
ER/UC. for IV hydration and mediciation to to stop vomiting and diarrhea. Sounds like either viral or bacterial gastroenteritis and dehydrtation must be prevented.