Answer:
the magnets can hover because like poles repel each other, causing the magnet in the center to float. so you have a South Pole of the top magnet facing down to the South pole of the middle magnet and the bottom would have to be North on top and south on the bottom.