It is an Object Creational pattern that enables a user to create objects without exposing how they are actually instantiated or by referring to the concrete class. It does this by introducing the FactoryClass which provides an interface that delegates this process.
Advantages or benefit
It creates families of related objects while keeping code loosely coupled and avoiding dependency on specific implementations.
Example
Usage of the Factory Pattern
Objects dog and cat were created without refererring to their concrete classes. Dog and Cat