An electromagnet is useful because it can be turned on and off easily (using an electric current), whereas a permanent magnet cannot be turned off and will continue to affect its immediate environment. 