That's a bit of a tricky question. In reality, the magnetic field that
a magnet produces goes out to infinity. It is just so weak at large
distances that you can't do much (or anything) with it. For instance,
the Earth's magnetic field is strongest at the magnetic poles (in
Canada and Antarctica) but is still present were we live. That is why a
compass works. But the Earth's magnetic field is weak enough here that
you can't do much else with it.
(There are also the changing magnetic fields in electromagnetic
waves like light, and these don't require any magnet nearby. Probably
these are not what you have in mind.)
On the other hand, a strong magnetic field can make things float.
In general, the best way to make things float is to use a
superconductor and a very strong magnet. One property of
superconductors is that they repel all magnetic fields. This is called
the Meissner effect. So if you place a strong magnet above a
superconductor, it will float.
You may think, why not just use 2 strong magnets? The problem with
that is that a magnet has 2 poles. While like poles will repel,
opposite poles will attract. So if you place 2 magnets near each other,
one will tend to flip over and then they'll get stuck together.
(published on 10/22/2007)