A soliloquy is a literary device often used in drama, literature, and poetry to reveal the inner thoughts of a character. It is an act of speaking one's thoughts aloud, whether by oneself or among any hearers, but not necessarily to oneself. Through soliloquies, readers can gain insight into what characters are thinking and feeling without having it filtered through another character's perspective. This allows for greater depth within characterization and provides insight into how characters feel about certain events as they unfold throughout the story.

The term "soliloquy" comes from Latin roots meaning "talking alone": solus (alone) plus loqui (to speak). In classical theatre, most plays featured at least one monologue spoken directly to the audience by a single actor playing multiple roles; these were known as soliloquies. Some famous examples include Hamlet's "To be or not to be" speech from Shakespeare's play Hamlet or Macbeth's "Tomorrow and tomorrow and tomorrow" speech in Macbeth. The speeches allow audiences to better understand each character's motivations while also giving the character time away from other characters on stage so that they may express their true feelings more freely than if someone else were present during their musings.

In modern writing, authors use this technique less frequently due to its theatrical connotations; however, some contemporary writers still make effective use of this style to provide further insights into their protagonists' personalities or states of mind without sacrificing narrative flow or momentum with long internal monologues. Otherwise, scenes featuring two different people conversing with each other on stage would interrupt the flow. Examples include Holden Caulfield's reflections upon his life decisions at various points throughout J. D. Salinger's Catcher in the Rye or Winston Smith contemplating his freedom versus security dilemma while sitting alone inside Room 101in George Orwell's 1984.

While less popular today than it once was centuries ago, the soliloquy remains an important tool for allowing readers access to deeper levels of understanding regarding complex issues such as morality, loyalty, and faithfulness, which resonate across classic and modern works alike.