What is going on?
Cornflakes are magnetic because they contain a significant amount of iron, a magnetic material. Standard cornflakes contain around 8 milligrams of iron per 100 grams (so 0.008% of the weight of a cornflake is iron). This is enough to cause a floating cornflake to move when it is near a magnet.
A Magnet vs a Magnetic Material...
We know that materials like iron (and materials that contain iron, like steel) are magnetic. However, they don't always act like permanent magnets - we can't use a random piece of steel to pick up other bits of steel. So, what makes a magnetic material act like a permanent magnet?
In any magnetic material, the atoms act like small magnets (so the atoms of iron in the cornflake do):
In permanent magnets, all these small magnets line up. This makes the material act like one big magnet:
In magnetic materials that don't act like magnets, like steel, all these small magnets are misaligned, so there is no overall magnetic field:
However, when a permanent magnet is placed next to the material, all the small magnets in the magnetic material are aligned, acting like a big magnet too - the alignment means the materials now attract each other.
Usually, if the permanent magnet is removed, then the material will go back to being misaligned again. However, we can permanently magnetise a material by holding it in a strong magnet field. This is what happens to knives and forks if we store them on a magnetic rack in the kitchen, or if we hold a paperclip next to a permanent magnet for a long time.