Some Mahayanists say things along the lines of the the world being an illusion, I'm not sure whether this is what their teachings really say or whether they've misinterpreted them.
I don't think there is any support for this view in Theravada teachings, after all if it's all an illusion then why bother doing anything to improve it.
See the Phena sutta, above.
The original term is "maya". It is kind of like English "illusion", but mostly referred to the magical creations of magicians at that time in India. Using something like a stone or a piece of wood, they would recite mantras over it. The audience would see something else appear, an elephant, or a person, or whatever. But there was no real elephant or person, or whatever behind it. It was a trick. It was said that awakened persons would not see that "maya", but only see the stick or stone, upon which the mantra was recited.
Also, the term is usually "like an illusion", not necessarily "illusion" - subtle difference worth noting.
In the other Sthavira / Thera schools, well before the Mahayana, the Sarvastivada had a number of sutras which dealt with this topic. One sutra is called the Mayajala Sutra (Net of Illusion), which was paired up with the Brahmajala Sutra, a very important early text.
Initially, the notion of "like an illusion" is closely associated with the ideas of phenomena being impermanent, and without substance.
What we think we see is not really how it is. The audience thinks they see an elephant, but there is no elephant. It is a metaphor, not a statement of fact.