Controlling Magnetism At The Nanoscale