A soliloquy is a monologue spoken by one character in a play, when he is entirely alone on stage. Its purpose is to inform the audience of his thoughts and inner conflicts.
If there are other characters on the stage, they are unable to hear another character's sililoquy.