How do I even know if I should go to the er? I've been throwing up, it got better, it got worse, then better?

If in doubt, Go. Most commonly vomiting is from stomach upset from viral infection ( stomach flu), medications, food poisoning or intolerance etc and self limiting. Warning signs needing immediate attention by medical professional will be, blood in vomitus, fever, severe retching, associated abdominal pain and signs and symptoms of dehydration.