Amazon Interview Question

Define the strategy pattern and when could it be used