A soliloquy in a drama is a passage where a character expresses his thoughts or feelings out loud, while either being alone on the stage, or with other actors who keep quiet.
Surely you know one of the most famous soliloquys of all time - To be or not to be, from Shakespeare's Hamlet.