S&T Interview Question

What is “factory pattern”, provide an example of a problem being solved by using this pattern