Some organisms can fix atmospheric nitrogen in specialised cells called heterocysts, for examples: Nostoc and Anabaena.
The colorless specialized cells of nostoc filament meant for fixing atmospheric N2 are called heterocysts.
Heterocysts have enzymes for fixing atmospheric nitrogen into ammonia which plants can use.