Gravity acts on them, but air resistance is such a large factor that slight uplift can hold them aloft for extended periods. Think about how dust or fog (water droplets) stay aloft, and consider that bacteria are smaller.
-
Maybe because they're so small and light, air is like liquid to them and more dense to smaller objects anyway.