Yes, cavities can form on the side of the tooth as well.  The top and base of the tooth tend to accumulate more plaque (which leads to cavities), so flossing helps prevent this from happening.  Flossing is also helpful for preventing gingivitis (inflamed gums) which is a major cause of tooth loss.
assistant
That is correct.  Cavities often form below the surface of the tooth, near the tooth's nerves.  Flossing helps remove plaque from these hard-to-reach areas as well.
assistant
Does flossing prevent cavities, or is it doing a different duty in terms of tooth health? I ask because cavities usually form on the base of the teeth, not the sides, where flossing cleans.
user
There is a growing body of evidence indicating that flossing helps prevent large cavities (more subtle microscopic cavities may not be as affected).  In any case flossing has other important health benefits for your gums, besides preventing cavity formation, so it's helpful to get into the habit of flossing regularly.
assistant
Does this mean cavities form in other areas of the tooth than just the base/top?
user