My officemate & I were just talking over this. The tricky part is "machine" - what can you do to make a machine? Also, we're not sure what type (size, shape) of magnet you have available.
How about a little rocket launcher? If you have disc-shaped magnets and if you put them end-to-end so that they repel each other, you can make a type of magnetic "spring". Fashion a tube out of paper, making the inside diameter just a little bigger than the disc magnets diameter. Then you can put the two magnets in the tube, N to N or S to S, so that they repel. The trick is to keep the top magnet from flipping over, which it will try to do.
Stand this tube/magnet assembly vertically and drop a pencil (unsharpened is best) into it, and force the two magnets closer together by pressing down on the pencil. Then let go! The pencil should fly up into the air.