The emp works on the compton effect. It was first detected in the first H-bomb blast. It knocked out power to some Hawainal towns hundreds of miles away from the blast. The way it works is the intence high energy gamma ray photons emmited from the bombs blast cause electrons to be knocked out of the orbits of low atomic number elements. This would happen in Oxygen and Nitrogen atoms in the atmosphere. This free rush of elecrons would interact with the earths magnetic field and induce a current, which would create a magnetic field. This electromagnetic pulse would then overload electrical appliances and elecric machines, such as cars. This overload would run down the line and fry wiers, semiconductors and transformers. Its a messed up weapon.
To construct and EMP, I wouldent know how to do that, but you would need a good rate of production of high energy gamma rays.