Neiltowers:
There is not much electronics involved in building an elecromagnet. An electromagnet has a soft iron core, usualy a large nail or bolt, around which wire is wound. The wire, usually solid enamel coated (magnet wire) wound on one direction around the iron core. Wire has a finte resistance which will determine the current. With 4 amps at 12 volts, use ohms law to detemine the resistance. Select a convenient wire size, find the resistance for that size wire and you can calculate the length. This amount of wire should fit on the core and can be calculated if neatly wound. When would, apply the 12 volts and you will have a basic electromagnet.
Elecmec