Magnetic levitation is an alternative for thrust bearing. That means it counters the axial loads. Very accurate and well-adjusted magnets should be used.
Magnets are mounted on the shaft which is highly polished [fine turning] with a sliding fit with very small clearance. One of the magnets should be fixed in the housing.
Usually magnetic levitation uses [depends on] the repulsion forces between magnets because magnets will not come in contact unless the load is too much.
Magnetic levitation also can use attraction forces between magnets but it has several problems:
v At low loads, the magnets can come in contact to each other if the load is not quite enough to separate them
v At high loads, the magnets will be far away from each other which means no magnetic interaction between them
v It requires both magnets to be fixed, one fixed on the shaft and the other to be fixed in the housing