Having trouble understanding patterns
Hello, I`m a second year student and I'm reading about patterns like a factory pattern. I have trouble understanding why I should use patterns and when to use which pattern.

Example ex = new ExampleBuilder().SetFieldA(1).SetFieldB(2).Build();Example ex = new Example { A = 1, B = 2 }