This review discusses the properties of magnetic field sensors based on semiconductors, such as Hall generators and magnetoresistors, and on magnetic metals, such as permalloy and the recently discovered 'giant magnetoresistance' metallic multilayers. Some emphasis is placed on the comparison between sensors made using these different technologies. Applications of magnetic field sensors in magnetic recording technology and in position sensing will be discussed briefly. Typically a sensor has to detect the difference between a high and a low value of field, around an average, which is of the order of 10(-3) T in recording applications, but can exceed 0.1 T in position sensors. Hall sensors, magnetoresistors, magnetotransistors, magnetodiodes and carrier-domain magnetometers made from group IV and III-V compound semiconductors are described first. Semiconductor magnetoresistors, typically made from InSb, are the solid state devices with the largest sensitivity at fields exceeding 0.1 T. Recently, InSb and InAs films have been grown on insulating InP, GaAs and Si substrates by MBE or MOVCD. Amplifying and signal processing electronics can now be integrated into the substrate onto which the sensor is grown. Magnetoresistors that use an almost two-dimensional layer of high-mobility electrons show much improved sensitivities and operating temperature ranges. Magnetoresistance in magnetic metal films is also used in sensors: permalloy devices are very sensitive in the lower field range. Giant magnetoresistances were discovered in superlattices with alternating layers of magnetic and non-magnetic metals, and the prospective applications of this effect are discussed.