To compose is to put something together, like a song, poem, or even yourself. You might want to compose yourself before returning to the party after a good cry.
The word compose began with the Latin ponere, which means "to put, place," referring to placing or arranging any piece of work. It's been in the music business since the 1590s, and it's generally still used to describe the act of writing songs. But you can use it whenever you're pulling something together: you might compose an essay for English class, or notice that the class is composed of all girls.