The Factory is a city facility which allows players to combine items (generally minerals or other components, such as iron, tungsten, catalysts) to create new items, usually for a fee.
Various recipes exist for numerous items types, ranging from energy and shield kids, to enchant cards, to Mystery Tokens used in the Aquarium - or even other minerals (ex. a player can combine Barine Ore to create High Purity Barine Ore, which is used for other recipes).
The factory is also very important, as it allows players using a Parts Shop Armour to upgrade their Armour by combining it with required minerals.
Many of the available recipes can be viewed using the in-game FAQ (however as of 10/2013, the FAQ is out of date and does not include a full list of recipes).