Magnetotaxis

Magnetotaxis is a process implemented by a diverse group of gram negative bacteria that involves orienting and coordinating movement in response to Earth's magnetic field. This process is mainly carried out by microaerophilic and anaerobic bacteria found in aquatic environments such as salt marshes, seawater, and freshwater lakes. By sensing the magnetic field, the bacteria are able to orient themselves towards environments with more favourable oxygen concentrations. This orientation towards more favourable oxygen concentrations allows the bacteria to reach these environments faster as opposed to if the bacteria were to move randomly to find these environments through Brownian motion. After orienting, the bacteria use flagella to swim along the magnetic field, towards the more favourable environment. Magnetotaxis has no impact on the average speed of the bacteria. Once these bacteria die, they are able to orient themselves to the Earth's magnetic field but they are incapable of migrating along the field. These bacteria are now simply called magnetic bacteria.
Magnetic bacteria (e.g. "Magnetospirillum magnetotacticum") contain internal structures known as magnetosomes which are responsible for the process of magnetotaxis. Magnetosomes contain crystals - often magnetite (Fe3O4). Some extremophile bacteria from sulfurous environments have been isolated with greigite (an iron-sulfide compound Fe3S4). Some magnetotactic bacteria also contain pyrite (FeS2) crystals, possibly as a transformation product of greigite. These crystals are contained within a bilayer membrane called the magnetosome membrane which is embedded with specific proteins. There are many different shapes of crystals however, crystal shape is usually consistent within a bacterial species. Most common arrangement of magnetosomes is in chains which allows a maximum magnetic dipole moment to be created. Within bacteria, there can be many chains of magnetosomes of different lengths that tend to align along the long axis of bacterial cell. The dipole moment created from the chains of magnetosomes allows the bacteria to align with the magnetic field as they move. 
By orienting towards the Earth's poles, marine bacteria are able to direct their movement downwards, towards the anaerobic/micro aerobic sediments. In the northern hemisphere, north seeking bacteria move downwards while in the southern hemisphere, south seeking bacteria dominate and move downwards. It was originally thought by scientists that south seeking bacteria would move upwards in the north hemisphere, towards very high concentrations of oxygen, and will be negatively selected for so that north seeking bacteria dominate in the northern hemisphere and vice versa. However, south seeking bacteria have been found in the northern hemisphere. Also, magnetic bacteria, both north and south seeking, are found even at the Earth's magnetic equator, where the field is directed horizontally. Some aspects of magnetotaxis are still not completely understood.