Boiling (or cooking an egg by any process) triggers crosslinkages between the protein molecules in the egg, solidifying it. A boiled egg can be spun and can stay spinning because it is solid...
Spin it on a table. The boiled egg will keep spinning since it is solid. The raw egg will not spin much since the solid shell is spinning while the liquid inside is not.
Around 4-5 minutes (from when the water begins to boil, since eggs should go into cold water then the water is brought to a boil). Timing does depend on how big the egg is though.