An allusion is a reference to another person, place, event or literary work in a piece of art or literature. We see allusions all over the place, often to classic literature and mythology. However, allusions can be used in common everyday speeches, movies, and television shows as well. For example, in Martin Luther King's "I Have a Dream" speech (which was delivered on the steps of the Lincoln Memorial), he states, "Five score years ago." This is an allusion to Abraham Lincoln's "Gettysburg Address" which famously begins: "Four score and seven years ago."
An allusion is a passing reference, without explicit identification, to historical or fictional characters, places or events or to other works that the writer assumes the reader would recognize. - (NTC's Dictionary of Literary Terms)
Allusions may refer to mythology, religion,art, literature and history. An allusion suggests always a connotative meaning. Allusion conveys meaning concisely or indirectly. Often in poetry, an allusion plays a greater role in reader's response and understanding.
Literary allusions are used to refer to certain literary characters or texts or even famous speeches that could be generally identified; some are put to use aimed at specific "coterie" (M. H. Abrams). Allusions from Shakespeare are most commonly used.
Examples will make the idea clearer:
In T. S. Eliot's "The Love song of J. Alfred Prufrock", there is a line where Prufrock utters- "No! I am not Prince Hamlet, nor was meant to be; / Am an attendant lord.../Full of high sentence, but a bit obtuse../ Almost ridiculous- / Almost, at times, the Fool." Here, the speaker who is a very confused, indecisive and alienated person, compares himself with Polonius of Hamlet who appears to be a spineless, passive and stupid character, more cowardly than Hamlet. Through this reference to the attendant lord, Polonius, Prufrock conveys his mental state easily. This is an allusion. Since it refers to a literary character, it is a literary allusion.
Robert frost's famous poem "Out, Out-" is about an accidental death of a young boy; the theme is unpredictability of life. The title of the poem is an allusion to the key phrase of a legendary Shakespearean speech in Macbeth: "Out, out, brief candle" (Act v, scene v). In that scene, Macbeth mourns as his wife dies thinking of the uncertainty and meaninglessness of life. This is also a literary allusion for it refers to a famous literary speech.
Similarly, if the allusions would have referred to historical or mythological or biblical work, they would have been historical or mythological or biblical allusions as well.