Factories are buildings capable of processing raw or refined products into components. Like Refineries, they take one or more products as inputs, although they only ever produce a single output component, which again depends on the manufacturing process selected.
A paradox. You want to turn raw materials into anything more refined, you burn energy and increase the amount of entropy in the universe. Jumbled pile of heterogeneous ore to an orderly stack of pure steel bars? Order from Entropy. The heat death of the universe, moved up by a few moments. Making things unmakes all things, on a long enough time scale.” Dr. Bryony Cain (after two and a half strong drinks).