Cupping is mostly associated with Traditional Chinese Medicine. In the ancient practice of cupping, it was believed to work in much the same way that they believed acupuncture did. The idea was that the body has an energy flow, and that this energy flow can go out of balance. To address the health issue, it was believed that the energy flow needed to be restored.
While you may find some proponents of cupping that still follow this belief, the treatment effect of cupping can be explained in terms that are a little more scientific. To apply treatment, the practitioner will heat the cup (there are some that use a mechanical pump to create the vacuum), the heated cup is then placed on a specific point on the body. As the glass cools, it will create a vacuum and pull some of the skin up into the cup. This suction increases blood flow and can be used to relieve tension.