Nitrogen fixation is mainly performed by bacteria in the soil (sometimes it is performed by lightning, though!). The bacteria combine the atmospheric nitrogen from the air with hydrogen to make ammonium.