Pergunta de entrevista da empresa Getty Images

Explain a factory design pattern and when will you use it.