Recitative is used in opera, oratorio and cantatas. When opera was invented around 1600 the composers needed to tell the story in music. In recitative the story is sung quickly, with maybe just a harpsichord playing a few chords. After a while, the situation in the story has changed, and the singer can sing an aria which is more interesting musically.