Answer:
The sonata as generally accepted today is a way of organizing a piece of played music and usually follows the pattern of four movements.
Allegro - a lively, sparkling opening piece.
Andante, Allegro, or Largo - a slower movement.
Minuet, or Scherzo - a light, dance type movement.
Finale - Rondo, or some other lively piece, sometimes a repeat of the Allegro.
Note that the Baroque use of the sonata was different to that in the Classical and Romantic periods.
basically it is a musical composition consisting (usually) 3 or 4 contrasting movements