Answer
The trick is based on electromagnetic induction.
Work Step by Step
When the switch is flipped, the newly formed field induces a current in the aluminum ring (as explained by Faraday's Law). This current generates a magnetic field, momentarily making the aluminum ring into a bar magnet. The ring's field opposes the original field produced by the hidden electromagnet. The aluminum ring is repelled into the air.