The stereotypical pulling a "rabbit out of a hat" trick has been around since at least 1814, by Louis Comte, a celebrated nineteenth-century Parisian magician.
In its simplest form, the hat sits on a specially made table, with the rabbit in a hidden compartment. The magician uses misdirection to reveal the rabbit.
This illustration is of a rabbit pulling a human out of a hat while on stage performing for an audience. The human seems to be pleased with the trick.