What is Optimization and how does it work?