See either manufacturing or production for an overview of this topic, and also Enterprise resource planning for computer management of it.