As an example from a previous post here, I made a recording that shows one possible way of how to develop and vary a theme within an improvisational context:
I start off with a simple 3-note motif as the melody with some accompanying chords on the bottom. (If you were to verbalize it, it would sound kind of like "Ta-ta-taaaaa".) I play around with it for a while, establishing the idea as something prominent within the context of the music. Although the point of the exercise is to work on one's variationing(?) chops, performers really shouldn't feel like they need to rush the process -- in fact, sitting on one idea for longer periods of time may even make its transition to something else that much sweeter. It also has the added benefit of freeing the mind from having to make too many decisions at once -- in this particular example, since the theme is already decided for me, it allows me to focus most of my attention toward the harmonic aspects of the music.
Around 1:30 or so, I take the idea of "a 3-note theme" then turn it into a sequence that moves upwards. Perhaps a more skilled/anal musician might think about the original theme's interval structures and transformative possibilities and such, but in this case I just took the general idea of moving upwards 3 notes at a time then used it as an excuse to move the music toward the upper registers. Variational processes can be very structured (the music of Bach) or very intuitive ("free" improvisation) depending on the personality of the musician, although in most cases what happens tend to lie somewhere between the two polarities.
Around 2:00-2:15 I probably got overly excited and added more notes to the upward sequence. You can hear bits and pieces of 4 and 5 note sequences that helped to propel the music further up. I reintroduce the original motif around 2:20 just to keep things from getting too out of control. Some of my teachers might say that by doing so I just lost an opportunity to push things further; for the sake of this recording, however, it probably didn't make much sense to do so. Either way, there's all kinds of decisions performers have to make on whether or not they might want to "push" things further, or simply stick to an idea for a while. There's no right or wrong way to do it, although an awareness of these vantage points gives the musician the power to play with these types of tensions.
The end is a hodgepodge of thematic ideas, some from the original theme, some from the 3-note sequence, some from the 4-5 note developments -- after a while they begin to blur together and new ideas begin to emerge even if I wasn't purposely trying to do so. Coming up with new material is actually not all that difficult, so people shouldn't really feel like they need to be particularly "creative" in order to do so. Ideas really are a dime-a-dozen, especially in this day and age of the internet -- it's mostly what you do with them that creates interest.