I'll disagree slightly with Art. I think variations can stray quite far from the original thematic material.
Variations can be built upon multiple elements:
- the actual melody set differently multiple times
- the underlying harmony of the original theme used as a basis for new invention
- motivic fragments of the original theme developed independently
- inversion of thematic elements (ie: retrogrades, mirrors, etc...)
Rachmaninov's "Rhapsody on a theme of Paganini" uses all of the above, for example. There are multiple moments in the 24 variations where the actual Paganini theme seems almost entirely absent, it has been stretched so far from its original form.
Sets of variations can use a classical structure: contrasting fast and slow variations.
They can be progressive: moving from very clear statements to progressively more distant relations.
In the "classical" set of variations there is always at least one variation which is a modal shift from the rest of the set. ie: if the set of variations are on a minor theme, then at least one variation is set in major, and vice-versa.
Some non-variation forms (officially) are in fact nothing more than sets of variations. This is often the case with passacaglias.
personally, I used a theme and set of variations as the entire structure for my cello concertino. The theme is made of two elements, then the subsequent variations encompass the development of the "sonata allegro" 1st movement, the scherzo, the adagio, and the final rondo.
Lutoslawski's Concerto for Orchestra uses a passacaglia/variations as its final movement, if memory serves me.