CoinDCX interview question

What is a factory pattern?