It's easy enough to be a vigilant hand-washer while you're still on the ground, where soap and water are pretty easy to come by. The airplane bathroom has both, too, so make good use of them.
But sometimes, you're sitting in the window seat with a sandwich on your tray and a rumbling stomach. Wait! Don't pick up that sandwich! Not yet, anyway. First squirt a little alcohol-based hand sanitizer into your palm and rub it around. Airplanes have lots of surfaces that everyone touches, like arm rests, tray tables, overhead bin handles, in-flight magazines, light switches -- the list goes on and on. A simple preventative measure, like using hand sanitizer, can help keep at least some of everyone else's germs out of your system.