The cadenza is a more or less virtuoso passage performed near the end of a concerto movement or aria, usually improvised by the performer, sometimes written out.
The composer, who was always also a performers (like Corelli, Vivaldi, Bach, Beethoven, Mozart, Paganini and many more), used to leave the soloist (himself) some space for the free improvisation after playing within a group, to show even more of his personality and technical and musical abilities.
Therefore, at the end of one or more movements, before the main theme comes back again, they used to write only one long note and often the indication Cadenza.
Some composers later wrote cadenzas for other famous composers' works (for example, Beethoven for Mozart's piano concertos). This tradition continued until the beginning of the 20th century and threfore for most of concertos we don't have original cadenzas written by the concertos composers.
An important exception is in Mozart's
Sinfonia Concertante
for violin, viola and orchestra. Perhaps it would have been a bit more difficult for two soloists to improvise together, (although they used to be very skilful in these things at that time, a bit like jazz players now), or for whatever other reason, anyway Mozart wrote not one, but two cadenzas for his Sinfonia Concertante: one for the first and one for the second movement.
They are interesting because they give us a hint on how Wolfgang himself might have played a cadenza. Watch this video with the first movement cadenza played by myself on the viola.
Cadenza from Mozart's Sinfonia Concertante for violin viola and orchestra
In the 20th century performers most often used to play cadenzas written by previous virtuoso players-performers, but more recently some have started again to play their own candenzas.
Unfortunately, we cannot know how, for example,
Paganini
played his own cadenzas, although he was famous for his improvisations and unusual effects.
An unusual cadenza
However, in this video you can see to what extent a performer can get in his own improvisations, if he wishes. After all, that was the intention of the cadenza. It is played on the violin by Gilles Apap for the third movement of Mozart's 3rd violin concerto in G major.
He's clearly having fun with it, I wish you to enjoy it.
Of course, there have been different, very contrasting reactions to this performance and I'm sure you'll have your own opinion...
Cadenza
For Solo Viola. By Krzysztof Penderecki. Schott. 8 pages. Published by Schott.
Symphonie Concertante (with Cadenza)
By Wolfgang Amadeus Mozart. Edited by Herrmann. For violin, viola, piano. K.364(E|). Published by C.F. Peters.
String Duos
For Violin and Viola - with Comments in English. By Franz Joseph Haydn. Edited by A. Friesenhagen " Cadenzas: K. Guntner. String Duos and Trios. Henle Music Folios. Pages: VI and 49. Urtext edition (Paper-bound). 56 pages. Published by G. Henle.