Factory and Configuration

What is the difference between factory and configuration table?

How factory and configurations are implemented?

Where factory and configuration settings are stored?