The CDC has a lot of official recommendations for preventing the spread of seasonal flu. Let me give you the short version of their list:
1. If you're feeling sick, stay at home unless you're seeking medical attention. Nobody else wants to deal with you or get sick because of you. 2. Keep your hands clean, and keep them away from your mouth, nose, eyes, and other people. 3. If some asshole's ignoring #1 and sneezing and/or vomiting in your general vicinity, stay away from that person. 4. Get plenty of sleep, stay hydrated, and eat nutritious food. 5. It's possible to spread the virus for 5 to 7 days after symptoms subside. Even if you're feeling well, it's still possible for you to infect another person.
If you are sick and worried about your illness, it's better to visit your doctor sooner than later. Should you require additional attention or medical advice, don't hesitate to seek out a professional.