Soliloquy

A soliloquy is a special kind of speech in a play. In a soliloquy, the character speaks to themselves. Other characters of the play are not aware of what is said. That way, the character can share certain thoughts or feelings with the audience. 
There are many famous soliloquies in Shakespeare's plays such as the "To be or not to be" soliloquy in "Hamlet", the "Is this a dagger" and the "Tomorrow, and tomorrow, and tomorrow" soliloquies in "Macbeth", and the "Bottom's Dream" soliloquy in "A Midsummer Night's Dream". Plays changed towards realism in the 18th century. Soliloquies became less common in plays.