CoinDCX Interview Question

What is a factory pattern?