characters monologue for a play!!!!!

Because I’m writing the play for theatre

The only thing I don’t understand is if you
create it off of a scene of the play
OR
Do you make a monologue for a character with a random story that relates to the play