Simply, the train carriage and track both have magnets on. The magnets are configured so that the carriage is repelled from the track. E.g. the track is covered with the S-pole exposed, and teh bottom of the carriage also has the S-poles exposed.
By having the carriage 'wrap around' the track - it will levitate and 'grip' the track laterally.
In practice, a variant of this system using 'Halbach array magnets' can be used. The arrays produce a more concentrated magnetic field, so you need fewer magnets, and the magnetic field doesn't leak into the carriage (and screw up hard drives and pacemakers). The problem with this is that the train only levitates when moving. So you need some wheels to take the weight when stopped.
The next problem is to add propulsion - one solution would be to attach a jet engine.
The more practical approach is to use a linear electric motor. Essentially, electromagnets in teh track are switched on and off in such a way as to attract and repel magnets on the carraiges.