As someone from the management side of things. As much as it hurts to have a body out of the office, especially if it's someone critical to a process. It's MY job to make sure business goes on with or without you there, I might need to call a sick employee for information, details, updates, etc. But try to avoid doing so when someone is out. (sick or vacation)
As I see it, the moment you feel under the weather, even if you're not sure if it's just something you ate or you're getting sick... STAY HOME!!! I can plan for one or two people to be out sick a few days... when the flu hits 2/3 the office that's beyond the bus factor my office can handle.
That said if you're not feeling well generally speaking I care about two things as a manager. First and foremost will coming in slow your recovery? Many illnesses sitting at a desk working isn't going to really affect your recovery, others you need to be at home in bed. Second are you contagious? This is huge to me! Sniffling from a cold? Go home. Stomach upset from a stomach bug? Go home. In significant discomfort from a kidney stone... well come in if you think you're up to it.
When contagious begins and ends varies tremendously depending on the illness. Colds you're typically contagious about 1 - 2 days before any symptoms show up, at the point the symptoms start easing up you're typically no longer contagious. Many stomach viruses you're contagious pretty much from just before symptoms start until they clear up.
I'm no doctor so please don't take those contagious times as fact more so "educated guessing". I recommend asking your employer first, if given the choice one day more than needed is always preferable to one day less than needed. (I make it a point to ask the doctor how I can tell when I'm no longer contagious, regardless of how I feel, if I can work and I'm not contagious I'm in the office)