The standard dictionary meaning of strategy: it is a plan of action designed to achieve a specific goal/target.
If I want to reach the office I will ride my bike and reach the office, I will call it Strategy-1. But these days petrol is very expensive and I am running out of money so to tackle this problem, I can use the train to solve the problem and I will call it Strategy-2. But now I found that train takes more time or it gets late most of the time so the next way to solve this problem is using the bus to reach the office I will call it Strategy-3.
So what happens above is, I am deciding the way to reach my office depending on the current situation.
Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it. -Gang of Four
Let’s take a look at another example. Our grill depends upon the strategy to tell us what type of food is to be grilled. It means that at runtime we are able to decide the type of food to be grilled.
Now, let’s get the grill ready.
Now let’s get grilling! We’ll start with some sandwiches.
These sandwiches are almost done, time to throw on the burger and veggie patties.
We were able to switch out items without creating a new class of Grill. We are not creating a new separate class for each new food item. That's how we avoid writing more code by using strategy pattern and combining components and writing a new class for every type of grill would become unmaintainable quickly.