Nitrogen is the most abundant element in the air. So if you want a 78% by volume concentration of nitrogen all you have to do is bottle some air. For more pure samples you can use fractional distillation or reverse osmosis. Also it is commonly a byproduct of air processing to remove oxygen for steel processing, since air is 20% oxygen. When separated, the remaining air is 97.5% nitrogen.