In this context, a bug is an illness caused by small organisms such as bacteria.
1) I have a bit of a stomach bug. I'm feeling ill, my stomach's not right.
2)...there is a bug going around. (In a particular area,) there is a germ or virus circulating that people are catching from each other. So lots of people are ill with it.