I have always though of improvisation as making music your own, or using your own creativity. That can mean playing something in the moment that comes to you. It can also mean looking at a piece of music and adding to it or tweaking what is written.
For example, I play in a band with a guitarist who doesn't read music. Sometimes she'll bring me a lead sheet with nothing but lyrics and chords. I can take those chords and play them arpeggiated, or I can add leading tones, scales, patterns, etc. and that is another kind of improvisation. Or, if I am given a complicated accompaniment for a choir that needs to be able to hear the melody, I can simplify it to make it easier to sing to, and that is another way to improvise.