The levitation device itself will be an electomagnet as you suspected with a field sensor. This will be attached to a microprocessor which will make the current adjustments required to keep the object floating. The can itself will have a permnent magnet inserted inside it - the manufacturers of these devices usually place this magnet inside the can, allowing them to provide the right strength of magnet.
Are you sure that the rotation of the can was powered? The floating can will be free to rotate in a frictionless environment, with only air resistance slowing its rotation down. It would be possible to set the can rotating and for it to keep going for some time.
It can be quite tricky to find the floating point of such devices. It is likely that you just couldn't find this when you removed the can. Owners of floating globes and the like often report that it can take a few minutes to find the perfect levitation point - and sometimes spacers are provided to help with this.