You may have noticed, perhaps around the time you started studying magnets in school, that we don't power vehicles by strapping a magnet to the front of them and propelling them forward with a second magnet just out of reach in front of it. Instead, we continue to power our cars using electricity and the remains of not dinosaurs like chumps.
This tells you one of two things: Either there is a very good reason that a magnet truck won't work, or you are the first person on Earth to come up with the idea of plonking a big ACME magnet on your van and are about to change the world.
Occasionally, people think (or most probably joke) that they're in the latter.
As you can probably see from the setup, the vehicle would not work in practice. If it did, you'd have yourself a perpetual motion machine, which is frowned upon by the laws of physics. If you'd like to see the magnet car tested, it of course has been for science demonstrations.
As people have pointed out, the one big reason why the magnet car doesn't work is those pesky and meddlesome laws of physics. Specifically, the law that an object at rest will remain at rest unless an outside force acts upon it, aka Newton's First Law of Motion; and the law that when one object exerts a force on a second object, the second object exerts an equal and opposite force on the first, Newton's equally (but not oppositely) successful Third Law of Motion.
The key part here is an outside force. The magnet, despite being dangled in front of the car like a carrot in front of a donkey, is still part of the same system as the car, attached by a bar and/or rope. They are not applying any force to any outside object, attracting only to each other and canceling out, and so remain as stationary as your car.
If you're having difficulty getting your head around it, imagine a different kind of force. As Rhett Allain explained for Wired, stretching out a giant rubber band in front of a car is also an attractive force that would propel the car forward if you were to walk in front of the car towing it. But you would not expect to be able to take the same large rubber band, lean out of the sunroof, stretch it out ahead of you, and still be propelled forward by it.
If you're still unconvinced, next time your car breaks down, try giving it a push entirely from the inside.