A soliloquy is a dramatic device in which a character speaks their thoughts aloud, typically while alone on stage, thereby revealing their inner feelings and motivations to the audience. It is often used in plays to provide insight into a character's psyche, allowing for deeper understanding of their actions and conflicts. This technique is commonly associated with Shakespearean drama but is utilized in various forms of theater.