Meaning: an act of speaking one’s thoughts aloud when by oneself or regardless of any hearers, especially by a character in a play.
Soliloquies and monologues have one thing in common: they each involve a solitary speaker. The difference between the two doesn’t have to do with who’s talking but with who’s listening.
But a soliloquy — from the Latin solus (“alone”) and loqui (“to speak”) — is a speech that one gives to oneself. In a play, a character delivering a soliloquy talks to herself — thinking out loud, as it were — so that the audience better understands what is happening to the character internally.
The most well-known soliloquy in the English language appears in Act III, Scene 1 of Hamlet:
To be, or not to be, — that is the question: —
Whether ’tis nobler in the mind to suffer
The slings and arrows of outrageous fortune
Or to take arms against a sea of troubles,
And by opposing end them? (etc.)