In music, improvisation is the art of playing an instrument (or singing) in which the musician or musicians make up the music as they play. Improvising is inventing at the same time as one does something. Some musicians only play music when they have written music in front of them, but it can be great fun to improvise music. It is a way of composing. Improvisation is common during a jam session.
Organists are often expected to improvise during a service. In this way they can fill in gaps in the service when there would otherwise be silence, they can make a smooth link between one piece of music and the next, and they can create the right atmosphere. In Baroque times in the Lutheran church organists would improvise a chorale prelude. This was a piece of music which uses the melody of the chorale (hymn) that the congregation sang. Bach was one of many composers who wrote many of his chorale preludes down. In more recent times some famous concert organists often finish an organ recital by playing an improvisation. This might be quite a long piece with several linked movements, finishing with a fugue. Somebody may give them the theme written on a piece of paper, so that it is quite unprepared.
A lot of people who play folk music improvise. Traditional folk music would not have been written down.
In traditional jazz the musicians usually improvise. It is quite tricky when a group of people are improvising together. They have to listen to one another and get ideas from one another. It can be a very exciting way of making music.
Improvisation also refers to a type of performance. Improvisation (or improv for short) is often used in comedy. Actors or Improvisers will create an entire show that they make up as they go along. They will often ask the audience for an idea or suggestion. They will then do a short performance based on the suggestion. This lets them do many different short performances during each night's show. This is called "Short-form improv".