A soliloquy is a character’s monologue in a play, not directed towards anyone in particular. Shakespeare uses them as a tool to reveal thought processes. An aside is a short expression of the characters’ feelings or thoughts. They share them with the audience, unbeknownst to other characters in the play.
Detailed answer:
Late Renaissance writers often used soliloquies for dramatic effect. They were aiming to provide a deep insight into a hero’s mind. Its purpose is to create a bond between a character and an audience. Revealing the former’s secret thoughts and feelings forms this connection. Despite being a sort of monologue, a soliloquy does not require other characters’ presence in the scene. An aside, meanwhile, does.
Hamlet’s speech, opening with the phrase “To be or not to be,” is one of the best-known examples of soliloquy. Shakespeare utilizes it to demonstrate the protagonist’s inner conflict. The prince wants to commit suicide but fears the “dread of something after death.”
The main difference is that an aside is much shorter than a soliloquy. A character addresses it to the audience, often to express an opinion on the others. For example, in an aside, Hamlet refers to Claudius as:
A little more than kin, and less than kind.
(Act I, Scene II)
Shakespeare uses this tool to reveal the prince’s true feelings to the audience, leaving Claudius in the dark.