Nausea and vomiting can be symptoms of a variety of things. If these symptoms present themselves along with diarrhea, it is probable that you are dealing with the stomach flu. Your body is trying to expel undesired material and it will do so in whichever direction it can. If you become nauseous soon after eating dodgy food, or after coming into contact with a sick person, there are several over the counter medicines that ease the symptoms while your body works the sickness out of your system.
Be sure to ingest plenty of electrolytes because your body can quickly become depleted as it forces material out of your digestive system. If vomiting continues to occur over a period of days with no relief, or if you notice blood in the expelled material, contact your doctor.