There is a clear difference between a soliloquy and an aside. In dramas such as Shakespeare's plays, especially "Hamlet," there are soliloquies delivered by the main characters. These are speeches given in private when the character is alone; such speeches are very revealing of the thoughts and feelings of the character. This is the purpose of the soliloquy.
An aside, however, is a line or so delivered by a character to the audience; the characters on stage do not hear what is being said, but they are present, unlike the situation involving a soliloquy.
Using "Hamlet" as an example, the Prince of Denmark, Hamlet, delivers seven different soliloquies. The most famous is his "to be, or not to be," a most introspective soliloquy in which the melancholic Hamlet wrestles with his conscience regarding the request of his father's ghost to avenge his murder. Hamlet is so depressed that he contemplates suicide, but he worries about the condemnation of his soul if he does so:
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....(III,i,56-59)
In this same play, directly before Hamlet's "to be" soliloquy Claudius delivers an aside in Act III, Scene 1 when he overhears Polonius talking to his daughter Ophelia, he feels some guilt--a guilt that he never reveals to anyone in the play--over his duplicity, and in aside that the other characters do not hear he says,
O, tis too true./How smart a lash that speech doth give my conscience!/The harlot's cheek, beautified with past'ring art,/Is not more ugly to the thing that helps it/Then is my deed to my most painted word./O heavy burden! (III,i,49-54)
A soliloquy and an aside are similar, but not the same. They are similar because they are both ways in which the writer can have a character tell the audience what he or she is thinking. The main difference is that a soliloquy is a long speech while an aside is a short comment.
A soliloquy is a speech in which the character reveals feelings or thoughts, but does so without speaking to any other character in the play.
An aside has the same purpose, but it is very brief -- it is meant to reveal a short thought, not a complex one.
Sometimes it is very necessary for a playwright to include a long soliloquy for a character. There are many reasons for this. For example, in the play Macbeth by William Shakespeare, the author has Lady Macbeth refer to a letter out loud and speak her own private thoughts about it on stage in the full hearing of the audience. This is too important to be an "aside" which sometimes has the appearance of a "throwaway" comment to illuminate a particular moment in a play for the benefit of the audience. Lady Macbeth's soliloquy serves the purpose of leaving the audience under absolutely no illusions as to the culpability for the evil thoughts and deeds. Her femininity cannot excuse her, nor weakness, nor duress, nor female submissiveness or dependency on males (preponderent at the time.) No, she did it all right - her part in the evil bloody plot comes out in her own words from the heart for us to hear in person.
Soliloque is a statement made by the character in which the character communicate is thought with himself which is not meant for the audience
While aside is a statement made which is meant for the audience