You pull a shot and it tastes like lemon juice. Next time it tastes like burnt toast. Same beans, same machine. The difference is almost always how much water got through the coffee and how fast, and that is something you can measure with a kitchen scale and a timer. Dialling in simply means changing one thing at a time until the cup tastes balanced.
Most baristas begin with the same three numbers: 18 g of ground coffee in the basket, 36 g of liquid espresso in the cup, in about 25 to 30 seconds. That is a 1:2 brew ratio (one part coffee, two parts drink by weight), with the water around 90 to 96 °C. It is a starting line, not a law. Darker roasts often taste better a little shorter (say 1:1.5 to 1:2), and light roasts a little longer (1:2 to 1:3), and your basket size sets how much coffee you can use in the first place.
Why weigh the output instead of eyeballing the cup? Espresso is full of foam (crema), so volume lies. Grams don't.
Put in what you did, then tell it how the shot tasted. It shows your ratio and what to change next.
Coffee gives up its flavour in a rough order. Acids dissolve first, then sugars and the sweet, round flavours, then the heavier bitter compounds last. Stop too early and you taste mostly acid: sour, sharp, a bit hollow. Run on too long and the bitter, dry end dominates. A good espresso lives in the middle.
The grind is your steering wheel. Finer grounds give the water more resistance and more surface, so it flows slower and extracts more. Coarser does the opposite. That is why the fix for sour is usually finer, and the fix for bitter is usually coarser. Grind changes by a notch or two at a time, because a single step can shift the time by several seconds.
Fix the dose first (the same 18 g, or whatever fits your basket), fix the yield (36 g to start), and then only touch the grind. Pull a shot, note the time and the taste, change the grind, repeat. Two or three shots usually get you close. Throw out the first shot after changing the grind; the grinder still holds old grounds.
If the time is right but the taste is off, change the ratio instead: shorter and more concentrated for more body, longer for more clarity and sweetness. If the time keeps jumping around for no reason, the problem is probably your prep (uneven distribution or tamping), not the grind.
Change one thing at a time. Taste. Write it down.
Freshness matters more than most people expect. Beans lose their aroma within a few weeks of roasting, and stale coffee can taste flat or bitter whatever the grind does. Also mind the caffeine: a double espresso has roughly 100 to 130 mg, so a few of them a day adds up, and it's wise to keep it light in the evening.
You can dial in on almost any machine, but a few things make it far easier. The first is a grinder with fine, repeatable steps, because everything above depends on being able to nudge the grind a little. A cheap blade grinder cannot do this. The second is a portafilter that takes a real dose and lets you see what you are doing; pressurised baskets forgive a bad grind but hide the feedback you are trying to learn from. The third is stable water temperature and pressure, so that a change in taste means a change you made. Finally, a kitchen scale with 0.1 g resolution and a timer costs little and does more for your coffee than a more expensive machine.