Demagnetize by heating the magnet strongly enuf or past the Curie Temperature.
ALso, by placing the magnet in an alternating magnetic field which can be created by coiling it and passing an A/C current.
Passing direct current will only make it magnetized. Steel can be permanently magnetized by Stroking (Moving a magnet from one end of the item to the other repeatedly) or by Placing it in an external magnetic field.
The most common method is stroking, however there is another method which involves the magnet to be heated strongly, and allowed to be cool in a magnetic field and hammering it as it cools.