Wash your hands early and often. That's standard advice for preventing the flu. But that's not always practical.
If hand-washing isn't possible, the federal Centers for Disease Control and Prevention suggests using alcohol-based hand rubs.
Studies show that products with sufficient alcohol content are effective at reducing the number of viral and bacterial germs on the hands. These products are also quick and convenient.
Note that only hand sanitizers that contain at least 60% alcohol are effective. (Some products on the market contain just 40% alcohol.) Either gel or liquid is fine, but choose products that contain isopropyl or ethanol alcohol.
Also note that hand sanitizers are different from antimicrobial soap. Antibacterial soap is used with water and is marketed as being able to kill bacteria. Studies show, however, that antibacterial soap is no more effective than non-antibacterial soap.
Hand sanitizers are designed to be used without water. Apply about a dime-size drop on one palm. Run your hands together to smear the product over all surfaces of the hands and fingers until dry. This should take about 20 seconds -- or you're not using enough sanitizer.